Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: incorrect strings and logics #1619

Merged
merged 4 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/services/manager_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ class ManagerAPI {
String defaultKeystorePassword = 's3cur3p@ssw0rd';
String defaultApiUrl = 'https://api.revanced.app/';
String defaultRepoUrl = 'https://api.github.com';
String defaultPatcherRepo = 'ReVanced/revanced-patcher';
String defaultPatchesRepo = 'ReVanced/revanced-patches';
String defaultIntegrationsRepo = 'ReVanced/revanced-integrations';
String defaultCliRepo = 'ReVanced/revanced-cli';
String defaultManagerRepo = 'ReVanced/revanced-manager';
String defaultPatcherRepo = 'revanced/revanced-patcher';
String defaultPatchesRepo = 'revanced/revanced-patches';
String defaultIntegrationsRepo = 'revanced/revanced-integrations';
String defaultCliRepo = 'revanced/revanced-cli';
String defaultManagerRepo = 'revanced/revanced-manager';
String? patchesVersion = '';
String? integrationsVersion = '';

Expand Down
3 changes: 1 addition & 2 deletions lib/ui/views/home/home_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ class HomeViewModel extends BaseViewModel {
Future<void> initialize(BuildContext context) async {
_managerAPI.rePatchedSavedApps().then((_) => _getPatchedApps());

_latestManagerVersion = await _managerAPI.getLatestManagerVersion();
if (!_managerAPI.getPatchesConsent()) {
await showPatchesConsent(context);
}

_latestManagerVersion = await _managerAPI.getLatestManagerVersion();

await _patcherAPI.initialize();

await flutterLocalNotificationsPlugin.initialize(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ class SManageApiUrl extends BaseViewModel {
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
border: const OutlineInputBorder(),
labelText: I18nText('settingsView.selectApiURL').toString(),
labelText: FlutterI18n.translate(
context,
'settingsView.selectApiURL',
),
hintText: apiUrl,
),
),
Expand Down
25 changes: 15 additions & 10 deletions lib/ui/views/settings/settingsFragment/settings_manage_sources.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ class SManageSources extends BaseViewModel {
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
border: const OutlineInputBorder(),
labelText: I18nText(
labelText: FlutterI18n.translate(
context,
'settingsView.hostRepositoryLabel',
).toString(),
),
hintText: hostRepository,
),
),
Expand All @@ -76,9 +77,10 @@ class SManageSources extends BaseViewModel {
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
border: const OutlineInputBorder(),
labelText: I18nText(
labelText: FlutterI18n.translate(
context,
'settingsView.orgPatchesLabel',
).toString(),
),
hintText: patchesRepo.split('/')[0],
),
),
Expand All @@ -94,9 +96,10 @@ class SManageSources extends BaseViewModel {
color: Colors.transparent,
),
border: const OutlineInputBorder(),
labelText: I18nText(
labelText: FlutterI18n.translate(
context,
'settingsView.sourcesPatchesLabel',
).toString(),
),
hintText: patchesRepo.split('/')[1],
),
),
Expand All @@ -112,9 +115,10 @@ class SManageSources extends BaseViewModel {
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
border: const OutlineInputBorder(),
labelText: I18nText(
labelText: FlutterI18n.translate(
context,
'settingsView.orgIntegrationsLabel',
).toString(),
),
hintText: integrationsRepo.split('/')[0],
),
),
Expand All @@ -130,9 +134,10 @@ class SManageSources extends BaseViewModel {
color: Colors.transparent,
),
border: const OutlineInputBorder(),
labelText: I18nText(
labelText: FlutterI18n.translate(
context,
'settingsView.sourcesIntegrationsLabel',
).toString(),
),
hintText: integrationsRepo.split('/')[1],
),
),
Expand Down