From c0a2e372e58a6b7233274ae945f5b1eb3a13665c Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sun, 5 May 2024 21:11:59 -0400 Subject: [PATCH 1/6] Fix asset date UI (#1590) + update packages --- lib/pages/app.dart | 2 +- lib/pages/apps.dart | 2 +- lib/pages/home.dart | 2 +- pubspec.lock | 68 +++++++++++++++------------------------------ pubspec.yaml | 2 +- 5 files changed, 26 insertions(+), 50 deletions(-) diff --git a/lib/pages/app.dart b/lib/pages/app.dart index a0ff893..1497475 100644 --- a/lib/pages/app.dart +++ b/lib/pages/app.dart @@ -133,7 +133,7 @@ class _AppPageState extends State { child: Text( app?.app.releaseDate == null ? tr('changes') - : app!.app.releaseDate.toString(), + : app!.app.releaseDate!.toLocal().toString(), textAlign: TextAlign.center, style: Theme.of(context).textTheme.labelSmall!.copyWith( diff --git a/lib/pages/apps.dart b/lib/pages/apps.dart index f26ca9a..ca188bc 100644 --- a/lib/pages/apps.dart +++ b/lib/pages/apps.dart @@ -437,7 +437,7 @@ class AppsPageState extends State { ? tr('changes') : '' : DateFormat('yyyy-MM-dd') - .format(listedApps[appIndex].app.releaseDate!); + .format(listedApps[appIndex].app.releaseDate!.toLocal()); } getSingleAppHorizTile(int index) { diff --git a/lib/pages/home.dart b/lib/pages/home.dart index 6d87a02..ff1655d 100644 --- a/lib/pages/home.dart +++ b/lib/pages/home.dart @@ -119,7 +119,7 @@ class _HomePageState extends State { } // Check initial link if app was in cold state (terminated) - final appLink = await _appLinks.getInitialAppLink(); + final appLink = await _appLinks.getInitialLink(); if (appLink != null) { await interpretLink(appLink); } diff --git a/pubspec.lock b/pubspec.lock index e2ca304..6d9a462 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -47,18 +47,18 @@ packages: dependency: "direct main" description: name: app_links - sha256: "42dc15aecf2618ace4ffb74a2e58a50e45cd1b9f2c17c8f0cafe4c297f08c815" + sha256: "1c2b9e9c56d80d17610bcbd111b37187875c5d0ded8654caa1bda14ea753d001" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "6.0.1" archive: dependency: transitive description: name: archive - sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" + sha256: ecf4273855368121b1caed0d10d4513c7241dfc813f7d3c8933b36622ae9b265 url: "https://pub.dev" source: hosted - version: "3.4.10" + version: "3.5.1" args: dependency: transitive description: @@ -79,10 +79,10 @@ packages: dependency: "direct main" description: name: background_fetch - sha256: "81d0d4eeecd17c971335438a5a55554c8302f479f92c7f7bc7f147f75d3f6074" + sha256: "2fe367c9be0e256dadb75b8b637b0b58a2a2d2317b7c8420bb1ae8b41e23fde3" url: "https://pub.dev" source: hosted - version: "1.3.3" + version: "1.3.4" boolean_selector: dependency: transitive description: @@ -147,14 +147,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" cross_file: dependency: transitive description: @@ -271,10 +263,10 @@ packages: dependency: "direct main" description: name: file_picker - sha256: "45c70b43df893027e441a6fa0aacc8f484fb9f9c60c746dc8f1dc4f774cf55cd" + sha256: "29c90806ac5f5fb896547720b73b17ee9aed9bba540dc5d91fe29f8c5745b10a" url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "8.0.3" fixnum: dependency: transitive description: @@ -340,10 +332,10 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: "8cdc719114ab1c86c64bb7a86d3a679674c3637edd229e3a994797d4a1504ce4" + sha256: "84a3af6c7fb43c85c3528b434dacc7a7ed4551d1209d93773bf6045cec9ace68" url: "https://pub.dev" source: hosted - version: "17.1.0" + version: "17.1.1" flutter_local_notifications_linux: dependency: transitive description: @@ -463,22 +455,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.18.1" - js: - dependency: transitive - description: - name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf - url: "https://pub.dev" - source: hosted - version: "0.7.1" json_annotation: dependency: transitive description: name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "4.9.0" leak_tracker: dependency: transitive description: @@ -635,10 +619,10 @@ packages: dependency: transitive description: name: permission_handler_android - sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474" + sha256: "8bb852cd759488893805c3161d0b2b5db55db52f773dbb014420b304055ba2c5" url: "https://pub.dev" source: hosted - version: "12.0.5" + version: "12.0.6" permission_handler_apple: dependency: transitive description: @@ -695,14 +679,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointycastle: - dependency: transitive - description: - name: pointycastle - sha256: "79fbafed02cfdbe85ef3fd06c7f4bc2cbcba0177e61b765264853d4253b21744" - url: "https://pub.dev" - source: hosted - version: "3.9.0" provider: dependency: "direct main" description: @@ -825,10 +801,10 @@ packages: dependency: "direct main" description: name: sqflite - sha256: "5ce2e1a15e822c3b4bfb5400455775e421da7098eed8adc8f26298ada7c9308c" + sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.3+1" sqflite_common: dependency: transitive description: @@ -889,10 +865,10 @@ packages: dependency: transitive description: name: timezone - sha256: "1cfd8ddc2d1cfd836bc93e67b9be88c3adaeca6f40a00ca999104c30693cdca0" + sha256: a6ccda4a69a442098b602c44e61a1e2b4bf6f5516e875bbf0f427d5df14745d5 url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "0.9.3" typed_data: dependency: transitive description: @@ -1009,10 +985,10 @@ packages: dependency: transitive description: name: webview_flutter_android - sha256: f038ee2fae73b509dde1bc9d2c5a50ca92054282de17631a9a3d515883740934 + sha256: dad3313c9ead95517bb1cae5e1c9d20ba83729d5a59e5e83c0a2d66203f27f91 url: "https://pub.dev" source: hosted - version: "3.16.0" + version: "3.16.1" webview_flutter_platform_interface: dependency: transitive description: @@ -1033,10 +1009,10 @@ packages: dependency: transitive description: name: win32 - sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" + sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb" url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.5.0" win32_registry: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 417c745..4c0dd75 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -66,7 +66,7 @@ dependencies: connectivity_plus: ^6.0.1 shared_storage: ^0.8.0 crypto: ^3.0.3 - app_links: ^4.0.0 + app_links: ^6.0.1 background_fetch: ^1.2.1 equations: ^5.0.2 flex_color_picker: ^3.4.1 From a3fddc5400611b111933006da8cc5c4752f1eae6 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sun, 5 May 2024 21:35:16 -0400 Subject: [PATCH 2/6] Fix non-APK GitHub release asset downloads (#1581) --- lib/app_sources/github.dart | 9 +++++---- lib/providers/apps_provider.dart | 34 +++++++++++++++----------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/lib/app_sources/github.dart b/lib/app_sources/github.dart index c7aa120..d5165a2 100644 --- a/lib/app_sources/github.dart +++ b/lib/app_sources/github.dart @@ -273,10 +273,11 @@ class GitHub extends AppSource { List> getReleaseAssetUrls(dynamic release) => (release['assets'] as List?)?.map((e) { - return (e['name'] != null) && - ((e['url'] ?? e['browser_download_url']) != null) - ? MapEntry(e['name'] as String, - (e['url'] ?? e['browser_download_url']) as String) + var url = !e['name'].toString().toLowerCase().endsWith('.apk') + ? (e['browser_download_url'] ?? e['url']) + : (e['url'] ?? e['browser_download_url']); + return (e['name'] != null) && (url != null) + ? MapEntry(e['name'] as String, url as String) : const MapEntry('', ''); }).toList() ?? []; diff --git a/lib/providers/apps_provider.dart b/lib/providers/apps_provider.dart index f2c1531..5b39320 100644 --- a/lib/providers/apps_provider.dart +++ b/lib/providers/apps_provider.dart @@ -142,19 +142,20 @@ List> moveStrToEndMapEntryWithCount( return arr; } -Future downloadFileWithRetry( - String url, String fileNameNoExt, Function? onProgress, String destDir, +Future downloadFileWithRetry(String url, String fileName, + bool fileNameHasExt, Function? onProgress, String destDir, {bool useExisting = true, Map? headers, int retries = 3}) async { try { - return await downloadFile(url, fileNameNoExt, onProgress, destDir, + return await downloadFile( + url, fileName, fileNameHasExt, onProgress, destDir, useExisting: useExisting, headers: headers); } catch (e) { if (retries > 0 && e is ClientException) { await Future.delayed(const Duration(seconds: 5)); return await downloadFileWithRetry( - url, fileNameNoExt, onProgress, destDir, + url, fileName, fileNameHasExt, onProgress, destDir, useExisting: useExisting, headers: headers, retries: (retries - 1)); } else { rethrow; @@ -201,8 +202,8 @@ Future checkPartialDownloadHash(String url, int bytesToGrab, return hashListOfLists(bytes); } -Future downloadFile( - String url, String fileNameNoExt, Function? onProgress, String destDir, +Future downloadFile(String url, String fileName, bool fileNameHasExt, + Function? onProgress, String destDir, {bool useExisting = true, Map? headers}) async { // Send the initial request but cancel it as soon as you have the headers var reqHeaders = headers ?? {}; @@ -222,7 +223,11 @@ Future downloadFile( if (url.toLowerCase().endsWith('.apk') && ext != 'apk') { ext = 'apk'; } - File downloadedFile = File('$destDir/$fileNameNoExt.$ext'); + File downloadedFile = File('$destDir/$fileName.$ext'); + if (fileNameHasExt) { + // If the user says the filename already has an ext, ignore whatever you inferred from above + downloadedFile = File('$destDir/$fileName'); + } bool rangeFeatureEnabled = false; if (resHeaders['accept-ranges']?.isNotEmpty == true) { @@ -435,8 +440,8 @@ class AppsProvider with ChangeNotifier { var headers = await source.getRequestHeaders(app.additionalSettings, forAPKDownload: true); var downloadedFile = await downloadFileWithRetry( - downloadUrl, fileNameNoExt, - headers: headers, (double? progress) { + downloadUrl, fileNameNoExt, false, headers: headers, + (double? progress) { int? prog = progress?.ceil(); if (apps[app.id] != null) { apps[app.id]!.downloadProgress = progress; @@ -969,15 +974,8 @@ class AppsProvider with ChangeNotifier { if (!downloadsAccessible && exportDir != null) { downloadPath = exportDir.path; } - await downloadFile( - fileUrl.value, - fileUrl.key - .split('.') - .reversed - .toList() - .sublist(1) - .reversed - .join('.'), (double? progress) { + await downloadFile(fileUrl.value, fileUrl.key, true, + (double? progress) { notificationsProvider .notify(DownloadNotification(fileUrl.key, progress?.ceil() ?? 0)); }, downloadPath, From 8cee268d13079365695dadedeb3a49d0e454bb03 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sun, 5 May 2024 21:43:05 -0400 Subject: [PATCH 3/6] Fix HTML release asset download (#1578) --- lib/pages/app.dart | 5 ++--- lib/providers/apps_provider.dart | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pages/app.dart b/lib/pages/app.dart index 1497475..3ed140c 100644 --- a/lib/pages/app.dart +++ b/lib/pages/app.dart @@ -175,9 +175,8 @@ class _AppPageState extends State { tr('downloadX', args: [tr('releaseAsset').toLowerCase()]), textAlign: TextAlign.center, style: Theme.of(context).textTheme.labelSmall!.copyWith( - decoration: - changeLogFn != null ? TextDecoration.underline : null, - fontStyle: changeLogFn != null ? FontStyle.italic : null, + decoration: TextDecoration.underline, + fontStyle: FontStyle.italic, ), ), ), diff --git a/lib/providers/apps_provider.dart b/lib/providers/apps_provider.dart index 5b39320..a7a05b5 100644 --- a/lib/providers/apps_provider.dart +++ b/lib/providers/apps_provider.dart @@ -223,6 +223,7 @@ Future downloadFile(String url, String fileName, bool fileNameHasExt, if (url.toLowerCase().endsWith('.apk') && ext != 'apk') { ext = 'apk'; } + fileName = fileName.split('/').last; // Ensure the fileName is a file name File downloadedFile = File('$destDir/$fileName.$ext'); if (fileNameHasExt) { // If the user says the filename already has an ext, ignore whatever you inferred from above From 0838a6d30bbd7ca78b0e3d2a8e14d204380d264f Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sun, 5 May 2024 21:51:05 -0400 Subject: [PATCH 4/6] Support for more Huawei AppGallery URL schemes (#1570) --- lib/app_sources/huaweiappgallery.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/app_sources/huaweiappgallery.dart b/lib/app_sources/huaweiappgallery.dart index 203b79f..8948faf 100644 --- a/lib/app_sources/huaweiappgallery.dart +++ b/lib/app_sources/huaweiappgallery.dart @@ -6,7 +6,7 @@ import 'package:obtainium/providers/source_provider.dart'; class HuaweiAppGallery extends AppSource { HuaweiAppGallery() { name = 'Huawei AppGallery'; - hosts = ['appgallery.huawei.com']; + hosts = ['appgallery.huawei.com', 'appgallery.cloud.huawei.com']; versionDetectionDisallowed = true; showReleaseDateAsVersionToggle = true; } @@ -14,7 +14,7 @@ class HuaweiAppGallery extends AppSource { @override String sourceSpecificStandardizeURL(String url) { RegExp standardUrlRegEx = RegExp( - '^https?://(www\\.)?${getSourceRegex(hosts)}/app/[^/]+', + '^https?://(www\\.)?${getSourceRegex(hosts)}(/#)?/(app|appdl)/[^/]+', caseSensitive: false); RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { @@ -24,7 +24,7 @@ class HuaweiAppGallery extends AppSource { } getDlUrl(String standardUrl) => - 'https://${hosts[0].replaceAll('appgallery.', 'appgallery.cloud.')}/appdl/${standardUrl.split('/').last}'; + 'https://${hosts[0].replaceAll('appgallery.huawei', 'appgallery.cloud.huawei')}/appdl/${standardUrl.split('/').last}'; requestAppdlRedirect( String dlUrl, Map additionalSettings) async { From 7478a7af2293bf32c21e04f28430e72efc5ec1fd Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sun, 5 May 2024 22:03:04 -0400 Subject: [PATCH 5/6] Add more links to the settings page (#1554) --- assets/translations/bs.json | 3 + assets/translations/cs.json | 3 + assets/translations/de.json | 3 + assets/translations/en.json | 2 + assets/translations/es.json | 3 + assets/translations/fa.json | 3 + assets/translations/fr.json | 3 + assets/translations/hu.json | 3 + assets/translations/it.json | 3 + assets/translations/ja.json | 3 + assets/translations/nl.json | 3 + assets/translations/pl.json | 3 + assets/translations/pt.json | 3 + assets/translations/ru.json | 2 + assets/translations/sv.json | 3 + assets/translations/tr.json | 3 + assets/translations/uk.json | 3 + assets/translations/vi.json | 3 + assets/translations/zh.json | 3 + lib/pages/settings.dart | 311 +++++++++++++++++++++--------------- 20 files changed, 237 insertions(+), 129 deletions(-) diff --git a/assets/translations/bs.json b/assets/translations/bs.json index de0923a..b719c19 100644 --- a/assets/translations/bs.json +++ b/assets/translations/bs.json @@ -113,6 +113,7 @@ "dark": "Tamna", "light": "Svijetla", "followSystem": "Pratite sistem", + "followSystemThemeExplanation": "Following system theme is possible only by using third-party applications", "useBlackTheme": "Koristite čisto crnu tamnu temu", "appSortBy": "Aplikacije sortirane po", "authorName": "Autor/Ime", @@ -309,6 +310,8 @@ "badDownload": "The APK could not be parsed (incompatible or partial download)", "beforeNewInstallsShareToAppVerifier": "Share new Apps with AppVerifier (if available)", "appVerifierInstructionToast": "Share to AppVerifier, then return here when ready.", + "wiki": "Help/Wiki", + "crowdsourcedConfigsLabel": "Crowdsourced App Configurations (use at your own risk)", "removeAppQuestion": { "one": "Želite li ukloniti aplikaciju?", "other": "Želite li ukloniti aplikacije?" diff --git a/assets/translations/cs.json b/assets/translations/cs.json index e001b6e..570d9d1 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -113,6 +113,7 @@ "dark": "Tmavé", "light": "Světlé", "followSystem": "Jako systém", + "followSystemThemeExplanation": "Sledování motivu systému je možné pouze pomocí aplikací třetích stran.", "useBlackTheme": "Použít čistě černé tmavé téma", "appSortBy": "Seřadit podle", "authorName": "Autor/Jméno", @@ -309,6 +310,8 @@ "badDownload": "APK nelze analyzovat (nekompatibilní nebo částečné stažení)", "beforeNewInstallsShareToAppVerifier": "Sdílení nových aplikací s aplikací AppVerifier (pokud je k dispozici)", "appVerifierInstructionToast": "Sdílejte do aplikace AppVerifier a po dokončení se sem vraťte.", + "wiki": "Nápověda/Wiki", + "crowdsourcedConfigsLabel": "Konfigurace aplikací s využitím crowdsourcingu (použití na vlastní nebezpečí)", "removeAppQuestion": { "one": "Odstranit Apku?", "other": "Odstranit Apky?" diff --git a/assets/translations/de.json b/assets/translations/de.json index 30abe9a..2aeaa18 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -113,6 +113,7 @@ "dark": "Dunkel", "light": "Hell", "followSystem": "System folgen", + "followSystemThemeExplanation": "Das folgende Systemthema ist nur durch die Verwendung von Drittanbieteranwendungen möglich", "useBlackTheme": "Verwende Pure Black Dark Theme", "appSortBy": "App sortieren nach", "authorName": "Autor/Name", @@ -309,6 +310,8 @@ "badDownload": "Die APK konnte nicht geparst werden (inkompatibler oder teilweiser Download)", "beforeNewInstallsShareToAppVerifier": "Neue Apps mit AppVerifier teilen (falls verfügbar)", "appVerifierInstructionToast": "Geben Sie die Daten an AppVerifier weiter und kehren Sie dann hierher zurück, wenn Sie fertig sind.", + "wiki": "Hilfe/Wiki", + "crowdsourcedConfigsLabel": "Crowdsourced App Configurations (Verwendung auf eigene Gefahr)", "removeAppQuestion": { "one": "App entfernen?", "other": "Apps entfernen?" diff --git a/assets/translations/en.json b/assets/translations/en.json index 14e1421..a33b342 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -310,6 +310,8 @@ "badDownload": "The APK could not be parsed (incompatible or partial download)", "beforeNewInstallsShareToAppVerifier": "Share new Apps with AppVerifier (if available)", "appVerifierInstructionToast": "Share to AppVerifier, then return here when ready.", + "wiki": "Help/Wiki", + "crowdsourcedConfigsLabel": "Crowdsourced App Configurations (use at your own risk)", "removeAppQuestion": { "one": "Remove App?", "other": "Remove Apps?" diff --git a/assets/translations/es.json b/assets/translations/es.json index b21002a..8e0b86c 100644 --- a/assets/translations/es.json +++ b/assets/translations/es.json @@ -113,6 +113,7 @@ "dark": "Oscuro", "light": "Claro", "followSystem": "Seguir al sistema", + "followSystemThemeExplanation": "Seguir el tema del sistema sólo es posible utilizando aplicaciones de terceros", "useBlackTheme": "Negro puro en tema oscuro", "appSortBy": "Ordenar aplicaciones por", "authorName": "Autor/nombre", @@ -309,6 +310,8 @@ "badDownload": "No se ha podido analizar el APK (incompatible o descarga parcial)", "beforeNewInstallsShareToAppVerifier": "Compartir nuevas aplicaciones con AppVerifier (si está disponible)", "appVerifierInstructionToast": "Comparta con AppVerifier y vuelva aquí cuando esté listo.", + "wiki": "Ayuda/Wiki", + "crowdsourcedConfigsLabel": "Crowdsourced App Configurations (uso bajo su propia responsabilidad)", "removeAppQuestion": { "one": "¿Eliminar aplicación?", "other": "¿Eliminar aplicaciones?" diff --git a/assets/translations/fa.json b/assets/translations/fa.json index f13367f..fb89930 100644 --- a/assets/translations/fa.json +++ b/assets/translations/fa.json @@ -113,6 +113,7 @@ "dark": "تاریک", "light": "روشن", "followSystem": "هماهنگ با سیستم", + "followSystemThemeExplanation": "Following system theme is possible only by using third-party applications", "useBlackTheme": "استفاده از تم تیره سیاه خالص", "appSortBy": "مرتب سازی برنامه بر اساس", "authorName": "سازنده/اسم", @@ -309,6 +310,8 @@ "badDownload": "The APK could not be parsed (incompatible or partial download)", "beforeNewInstallsShareToAppVerifier": "Share new Apps with AppVerifier (if available)", "appVerifierInstructionToast": "Share to AppVerifier, then return here when ready.", + "wiki": "Help/Wiki", + "crowdsourcedConfigsLabel": "Crowdsourced App Configurations (use at your own risk)", "removeAppQuestion": { "one": "برنامه حذف شود؟", "other": "برنامه ها حذف شوند؟" diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 2dc0d7c..b03449e 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -113,6 +113,7 @@ "dark": "Sombre", "light": "Clair", "followSystem": "Suivre le système", + "followSystemThemeExplanation": "Il n'est possible de suivre le thème du système qu'en utilisant des applications tierces.", "useBlackTheme": "Utilisez le thème noir pur", "appSortBy": "Applications triées par", "authorName": "Auteur/Nom", @@ -309,6 +310,8 @@ "badDownload": "L'APK n'a pas pu être analysé (téléchargement incompatible ou partiel)", "beforeNewInstallsShareToAppVerifier": "Partager les nouvelles applications avec AppVerifier (si disponible)", "appVerifierInstructionToast": "Partagez avec AppVerifier, puis revenez ici lorsque vous êtes prêt.", + "wiki": "Aide/Wiki", + "crowdsourcedConfigsLabel": "Configurations d'applications par la foule (utilisation à vos risques et périls)", "removeAppQuestion": { "one": "Supprimer l'application ?", "other": "Supprimer les applications ?" diff --git a/assets/translations/hu.json b/assets/translations/hu.json index 3a24c2f..08916bf 100644 --- a/assets/translations/hu.json +++ b/assets/translations/hu.json @@ -113,6 +113,7 @@ "dark": "Sötét", "light": "Világos", "followSystem": "Rendszer szerint", + "followSystemThemeExplanation": "A következő rendszer téma csak harmadik féltől származó alkalmazások használatával lehetséges", "useBlackTheme": "Használjon teljesen fekete sötét témát", "appSortBy": "App rendezés...", "authorName": "Szerző/Név", @@ -309,6 +310,8 @@ "badDownload": "Az APK-t nem lehetett elemezni (inkompatibilis vagy részleges letöltés)", "beforeNewInstallsShareToAppVerifier": "Új alkalmazások megosztása az AppVerifierrel (ha elérhető)", "appVerifierInstructionToast": "Ossza meg az AppVerifierrel, majd térjen vissza ide, ha kész.", + "wiki": "Súgó/Wiki", + "crowdsourcedConfigsLabel": "Crowdsourced App Configurations (használat saját felelősségre)", "removeAppQuestion": { "one": "Eltávolítja az alkalmazást?", "other": "Eltávolítja az alkalmazásokat?" diff --git a/assets/translations/it.json b/assets/translations/it.json index 18187d7..84ddbc2 100644 --- a/assets/translations/it.json +++ b/assets/translations/it.json @@ -113,6 +113,7 @@ "dark": "Scuro", "light": "Chiaro", "followSystem": "Segui il sistema", + "followSystemThemeExplanation": "È possibile seguire il tema di sistema solo utilizzando applicazioni di terze parti.", "useBlackTheme": "Usa il tema nero puro", "appSortBy": "App ordinate per", "authorName": "Autore/Nome", @@ -309,6 +310,8 @@ "badDownload": "Non è stato possibile analizzare l'APK (download incompatibile o parziale).", "beforeNewInstallsShareToAppVerifier": "Condividere le nuove applicazioni con AppVerifier (se disponibile)", "appVerifierInstructionToast": "Condividete con AppVerifier, quindi tornate qui quando siete pronti.", + "wiki": "Aiuto/Wiki", + "crowdsourcedConfigsLabel": "Configurazioni di app in crowdsourcing (uso a proprio rischio)", "removeAppQuestion": { "one": "Rimuovere l'app?", "other": "Rimuovere le app?" diff --git a/assets/translations/ja.json b/assets/translations/ja.json index b9e6b33..5984ee1 100644 --- a/assets/translations/ja.json +++ b/assets/translations/ja.json @@ -113,6 +113,7 @@ "dark": "ダーク", "light": "ライト", "followSystem": "システムに従う", + "followSystemThemeExplanation": "以下のシステムテーマは、サードパーティのアプリケーションを使用することによってのみ可能です。", "useBlackTheme": "ピュアブラックダークテーマを使用する", "appSortBy": "アプリの並び方", "authorName": "作者名/アプリ名", @@ -309,6 +310,8 @@ "badDownload": "APK を解析できませんでした(互換性がないか、部分的にダウンロードされています)。", "beforeNewInstallsShareToAppVerifier": "AppVerifierで新しいアプリを共有する(利用可能な場合)", "appVerifierInstructionToast": "AppVerifierに共有し、準備ができたらここに戻ってください。", + "wiki": "ヘルプ/ウィキ", + "crowdsourcedConfigsLabel": "クラウドソーシングによるアプリの設定(利用は自己責任で)", "removeAppQuestion": { "one": "アプリを削除しますか?", "other": "アプリを削除しますか?" diff --git a/assets/translations/nl.json b/assets/translations/nl.json index 1582e3a..72b2acd 100644 --- a/assets/translations/nl.json +++ b/assets/translations/nl.json @@ -113,6 +113,7 @@ "dark": "Donker", "light": "Licht", "followSystem": "Volg systeem", + "followSystemThemeExplanation": "Het volgende systeemthema is alleen mogelijk met toepassingen van derden", "useBlackTheme": "Gebruik zwart thema", "appSortBy": "App sorteren op", "authorName": "Auteur/Naam", @@ -309,6 +310,8 @@ "badDownload": "De APK kon niet worden verwerkt (incompatibele of gedeeltelijke download)", "beforeNewInstallsShareToAppVerifier": "Nieuwe Apps delen met AppVerifier (indien beschikbaar)", "appVerifierInstructionToast": "Deel naar AppVerifier en keer hier terug als je klaar bent.", + "wiki": "Help/Wiki", + "crowdsourcedConfigsLabel": "Crowdsourced App-configuraties (gebruik op eigen risico)", "removeAppQuestion": { "one": "App verwijderen?", "other": "Apps verwijderen?" diff --git a/assets/translations/pl.json b/assets/translations/pl.json index dc282a3..e31064e 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -113,6 +113,7 @@ "dark": "Ciemny", "light": "Jasny", "followSystem": "Zgodny z systemem", + "followSystemThemeExplanation": "Podążanie za motywem systemowym jest możliwe tylko przy użyciu aplikacji firm trzecich", "useBlackTheme": "Użyj czarnego motywu", "appSortBy": "Sortuj aplikacje według", "authorName": "Autor/Nazwa", @@ -309,6 +310,8 @@ "badDownload": "Nie można przeanalizować pliku APK (niekompatybilny lub częściowo pobrany).", "beforeNewInstallsShareToAppVerifier": "Udostępnianie nowych aplikacji za pomocą AppVerifier (jeśli dostępne)", "appVerifierInstructionToast": "Udostępnij w AppVerifier, a następnie wróć tutaj, gdy będziesz gotowy.", + "wiki": "Pomoc/Wiki", + "crowdsourcedConfigsLabel": "Konfiguracje aplikacji pochodzące z crowdsourcingu (korzystanie na własne ryzyko)", "removeAppQuestion": { "one": "Usunąć aplikację?", "few": "Usunąć aplikacje?", diff --git a/assets/translations/pt.json b/assets/translations/pt.json index d6be691..90e7f75 100644 --- a/assets/translations/pt.json +++ b/assets/translations/pt.json @@ -113,6 +113,7 @@ "dark": "Escuro", "light": "Claro", "followSystem": "Padrão do sistema", + "followSystemThemeExplanation": "O tema do sistema seguinte só é possível através da utilização de aplicações de terceiros", "useBlackTheme": "Usar tema preto AMOLED", "appSortBy": "Classificar aplicativo por", "authorName": "Autor/Nome", @@ -309,6 +310,8 @@ "badDownload": "Não foi possível analisar o APK (transferência incompatível ou parcial)", "beforeNewInstallsShareToAppVerifier": "Partilhar novas aplicações com o AppVerifier (se disponível)", "appVerifierInstructionToast": "Partilhe com o AppVerifier e, em seguida, regresse aqui quando estiver pronto.", + "wiki": "Ajuda/Wiki", + "crowdsourcedConfigsLabel": "Configurações de aplicações de crowdsourcing (utilização por sua conta e risco)", "removeAppQuestion": { "one": "Remover aplicativo?", "other": "Remover aplicativos?" diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 4135c1c..ae36431 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -310,6 +310,8 @@ "badDownload": "APK не удалось разобрать (несовместимая или неполная загрузка)", "beforeNewInstallsShareToAppVerifier": "Поделитесь новыми приложениями с AppVerifier (если доступно)", "appVerifierInstructionToast": "Поделитесь с AppVerifier, а затем вернитесь сюда, когда будете готовы.", + "wiki": "Помощь/Вики", + "crowdsourcedConfigsLabel": "Конфигурации приложений на основе краудсорсинга (используйте на свой страх и риск)", "removeAppQuestion": { "one": "Удалить приложение?", "other": "Удалить приложения?" diff --git a/assets/translations/sv.json b/assets/translations/sv.json index 579e58c..3dd5328 100644 --- a/assets/translations/sv.json +++ b/assets/translations/sv.json @@ -113,6 +113,7 @@ "dark": "Mörkt", "light": "Ljust", "followSystem": "Följ System", + "followSystemThemeExplanation": "Följande systemtema är endast möjligt med hjälp av tredjepartsapplikationer", "useBlackTheme": "Använd svart tema", "appSortBy": "Sortera Appar via", "authorName": "Utvecklare/Namn", @@ -309,6 +310,8 @@ "badDownload": "APK kunde inte analyseras (inkompatibel eller partiell nedladdning)", "beforeNewInstallsShareToAppVerifier": "Dela nya appar med AppVerifier (om tillgängligt)", "appVerifierInstructionToast": "Dela till AppVerifier och återvänd sedan hit när du är klar.", + "wiki": "Hjälp/Wiki", + "crowdsourcedConfigsLabel": "Crowdsourcade appkonfigurationer (använd på egen risk)", "removeAppQuestion": { "one": "Ta Bort App?", "other": "Ta Bort Appar?" diff --git a/assets/translations/tr.json b/assets/translations/tr.json index 2c8ff70..ae3c99a 100644 --- a/assets/translations/tr.json +++ b/assets/translations/tr.json @@ -113,6 +113,7 @@ "dark": "Koyu", "light": "Aydınlık", "followSystem": "Sistemi Takip Et", + "followSystemThemeExplanation": "Sistem temasını takip etmek yalnızca üçüncü taraf uygulamaları kullanarak mümkündür", "useBlackTheme": "Saf siyah koyu temasını kullan", "appSortBy": "Uygulama Sıralama Ölçütü", "authorName": "Yazar/Ad", @@ -309,6 +310,8 @@ "badDownload": "APK ayrıştırılamadı (uyumsuz veya kısmi indirme)", "beforeNewInstallsShareToAppVerifier": "Yeni Uygulamaları AppVerifier ile paylaşın (varsa)", "appVerifierInstructionToast": "AppVerifier ile paylaşın, hazır olduğunuzda buraya dönün.", + "wiki": "Yardım/Wiki", + "crowdsourcedConfigsLabel": "Kitle Kaynaklı Uygulama Yapılandırmaları (riski size ait olmak üzere kullanın)", "removeAppQuestion": { "one": "Uygulamayı Kaldır?", "other": "Uygulamaları Kaldır?" diff --git a/assets/translations/uk.json b/assets/translations/uk.json index a087232..87a8cba 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -113,6 +113,7 @@ "dark": "Темна", "light": "Світла", "followSystem": "Дотримуватися системи", + "followSystemThemeExplanation": "Зміна теми системи можлива лише за допомогою сторонніх додатків", "useBlackTheme": "Використовувати чорну тему (Amoled)", "appSortBy": "Сортувати застосунки за", "authorName": "Автор/Назва", @@ -309,6 +310,8 @@ "badDownload": "APK не вдалося розпарсити (несумісний або часткове завантаження)", "beforeNewInstallsShareToAppVerifier": "Діліться новими додатками з AppVerifier (якщо доступно)", "appVerifierInstructionToast": "Надішліть на AppVerifier, а потім поверніться сюди, коли будете готові.", + "wiki": "Довідка/Вікі", + "crowdsourcedConfigsLabel": "Краудсорсингові конфігурації додатків (використовуйте на свій страх і ризик)", "removeAppQuestion": { "one": "Видалити застосунок?", "other": "Видалити застосунки?" diff --git a/assets/translations/vi.json b/assets/translations/vi.json index 571badb..3b52cae 100644 --- a/assets/translations/vi.json +++ b/assets/translations/vi.json @@ -113,6 +113,7 @@ "dark": "Tối", "light": "Sáng", "followSystem": "Theo hệ thống", + "followSystemThemeExplanation": "Following system theme is possible only by using third-party applications", "useBlackTheme": "Nền đen", "appSortBy": "Sắp xếp ứng dụng", "authorName": "Tác giả", @@ -309,6 +310,8 @@ "badDownload": "Không thể phân tích cú pháp APK (tải xuống một phần hoặc không tương thích)", "beforeNewInstallsShareToAppVerifier": "Chia sẻ ứng dụng mới với AppVerifier (nếu có)", "appVerifierInstructionToast": "Chia sẻ lên AppVerifier, sau đó quay lại đây khi sẵn sàng.", + "wiki": "Help/Wiki", + "crowdsourcedConfigsLabel": "Crowdsourced App Configurations (use at your own risk)", "removeAppQuestion": { "one": "Gỡ ứng dụng?", "other": "Gỡ ứng dụng?" diff --git a/assets/translations/zh.json b/assets/translations/zh.json index eea0e22..f24d49e 100644 --- a/assets/translations/zh.json +++ b/assets/translations/zh.json @@ -113,6 +113,7 @@ "dark": "深色", "light": "浅色", "followSystem": "跟随系统", + "followSystemThemeExplanation": "只有使用第三方应用程序,才有可能跟踪系统主题", "useBlackTheme": "使用纯黑深色主题", "appSortBy": "排序依据", "authorName": "作者 / 应用名称", @@ -309,6 +310,8 @@ "badDownload": "无法解析 APK 文件(不兼容或文件不完整)", "beforeNewInstallsShareToAppVerifier": "与 AppVerifier 共享新应用程序(如有)", "appVerifierInstructionToast": "分享到 AppVerifier,准备就绪后返回此处。", + "wiki": "帮助/维基", + "crowdsourcedConfigsLabel": "众包应用程序配置(使用风险自负)", "removeAppQuestion": { "one": "是否删除应用?", "other": "是否删除应用?" diff --git a/lib/pages/settings.dart b/lib/pages/settings.dart index 367e842..7df6eca 100644 --- a/lib/pages/settings.dart +++ b/lib/pages/settings.dart @@ -26,20 +26,33 @@ class SettingsPage extends StatefulWidget { class _SettingsPageState extends State { List updateIntervalNodes = [ - 15, 30, 60, 120, 180, 360, 720, 1440, 4320, 10080, 20160, 43200]; + 15, + 30, + 60, + 120, + 180, + 360, + 720, + 1440, + 4320, + 10080, + 20160, + 43200 + ]; int updateInterval = 0; - late SplineInterpolation updateIntervalInterpolator; // 🤓 + late SplineInterpolation updateIntervalInterpolator; // 🤓 String updateIntervalLabel = tr('neverManualOnly'); bool showIntervalLabel = true; final Map, String> colorsNameMap = - , String> { + , String>{ ColorTools.createPrimarySwatch(obtainiumThemeColor): 'Obtainium' }; void initUpdateIntervalInterpolator() { List nodes = []; for (final (index, element) in updateIntervalNodes.indexed) { - nodes.add(InterpolationNode(x: index.toDouble()+1, y: element.toDouble())); + nodes.add( + InterpolationNode(x: index.toDouble() + 1, y: element.toDouble())); } updateIntervalInterpolator = SplineInterpolation(nodes: nodes); } @@ -69,7 +82,7 @@ class _SettingsPageState extends State { int valRounded = (valInterpolated / 30).floor() * 30; updateInterval = valRounded; updateIntervalLabel = plural('hour', valRounded / 60); - } else if (valInterpolated < 7 * 24 * 60){ + } else if (valInterpolated < 7 * 24 * 60) { int valRounded = (valInterpolated / (12 * 60)).floor() * 12 * 60; updateInterval = valRounded; updateIntervalLabel = plural('day', valRounded / (24 * 60)); @@ -90,21 +103,18 @@ class _SettingsPageState extends State { var followSystemThemeExplanation = FutureBuilder( builder: (ctx, val) { - return ((val.data?.version.sdkInt ?? 30) < 29) ? - Text(tr('followSystemThemeExplanation'), - style: Theme.of(context).textTheme.labelSmall) - : const SizedBox.shrink(); + return ((val.data?.version.sdkInt ?? 30) < 29) + ? Text(tr('followSystemThemeExplanation'), + style: Theme.of(context).textTheme.labelSmall) + : const SizedBox.shrink(); }, - future: DeviceInfoPlugin().androidInfo - ); + future: DeviceInfoPlugin().androidInfo); Future colorPickerDialog() async { return ColorPicker( color: settingsProvider.themeColor, onColorChanged: (Color color) => - setState(() => - settingsProvider.themeColor = color - ), + setState(() => settingsProvider.themeColor = color), actionButtons: const ColorPickerActionButtons( okButton: true, closeButton: true, @@ -137,19 +147,17 @@ class _SettingsPageState extends State { showColorName: true, materialNameTextStyle: Theme.of(context).textTheme.bodySmall, colorNameTextStyle: Theme.of(context).textTheme.bodySmall, - copyPasteBehavior: const ColorPickerCopyPasteBehavior(longPressMenu: true), + copyPasteBehavior: + const ColorPickerCopyPasteBehavior(longPressMenu: true), ).showPickerDialog( context, - transitionBuilder: (BuildContext context, - Animation a1, Animation a2, Widget widget) { + transitionBuilder: (BuildContext context, Animation a1, + Animation a2, Widget widget) { final double curvedValue = Curves.easeInCubic.transform(a1.value); return Transform( alignment: Alignment.center, transform: Matrix4.diagonal3Values(curvedValue, curvedValue, 1), - child: Opacity( - opacity: curvedValue, - child: widget - ), + child: Opacity(opacity: curvedValue, child: widget), ); }, transitionDuration: const Duration(milliseconds: 250), @@ -157,46 +165,44 @@ class _SettingsPageState extends State { } var colorPicker = ListTile( - dense: true, - contentPadding: EdgeInsets.zero, - title: Text(tr('selectX', args: [tr('colour')])), - subtitle: Text("${ColorTools.nameThatColor(settingsProvider.themeColor)} " - "(${ColorTools.materialNameAndCode(settingsProvider.themeColor, - colorSwatchNameMap: colorsNameMap)})"), - trailing: ColorIndicator( - width: 40, - height: 40, - borderRadius: 20, - color: settingsProvider.themeColor, - onSelectFocus: false, - onSelect: () async { - final Color colorBeforeDialog = settingsProvider.themeColor; - if (!(await colorPickerDialog())) { - setState(() { - settingsProvider.themeColor = colorBeforeDialog; - }); - } - } - ) - ); + dense: true, + contentPadding: EdgeInsets.zero, + title: Text(tr('selectX', args: [tr('colour')])), + subtitle: Text( + "${ColorTools.nameThatColor(settingsProvider.themeColor)} " + "(${ColorTools.materialNameAndCode(settingsProvider.themeColor, colorSwatchNameMap: colorsNameMap)})"), + trailing: ColorIndicator( + width: 40, + height: 40, + borderRadius: 20, + color: settingsProvider.themeColor, + onSelectFocus: false, + onSelect: () async { + final Color colorBeforeDialog = settingsProvider.themeColor; + if (!(await colorPickerDialog())) { + setState(() { + settingsProvider.themeColor = colorBeforeDialog; + }); + } + })); var useMaterialThemeSwitch = FutureBuilder( builder: (ctx, val) { - return ((val.data?.version.sdkInt ?? 0) >= 31) ? - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible(child: Text(tr('useMaterialYou'))), - Switch( - value: settingsProvider.useMaterialYou, - onChanged: (value) { - settingsProvider.useMaterialYou = value; - }) - ], - ) : const SizedBox.shrink(); + return ((val.data?.version.sdkInt ?? 0) >= 31) + ? Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Flexible(child: Text(tr('useMaterialYou'))), + Switch( + value: settingsProvider.useMaterialYou, + onChanged: (value) { + settingsProvider.useMaterialYou = value; + }) + ], + ) + : const SizedBox.shrink(); }, - future: DeviceInfoPlugin().androidInfo - ); + future: DeviceInfoPlugin().androidInfo); var sortDropdown = DropdownButtonFormField( isExpanded: true, @@ -343,13 +349,20 @@ class _SettingsPageState extends State { ), //intervalDropdown, height16, - if (showIntervalLabel) SizedBox( - child: Text("${tr('bgUpdateCheckInterval')}: $updateIntervalLabel") - ) else const SizedBox(height: 16), + if (showIntervalLabel) + SizedBox( + child: Text( + "${tr('bgUpdateCheckInterval')}: $updateIntervalLabel")) + else + const SizedBox(height: 16), intervalSlider, FutureBuilder( builder: (ctx, val) { - return (settingsProvider.updateInterval > 0) && (((val.data?.version.sdkInt ?? 0) >= 30) || settingsProvider.useShizuku) + return (settingsProvider.updateInterval > + 0) && + (((val.data?.version.sdkInt ?? 0) >= + 30) || + settingsProvider.useShizuku) ? Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -491,33 +504,33 @@ class _SettingsPageState extends State { children: [ Flexible( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text(tr( - 'beforeNewInstallsShareToAppVerifier')), - GestureDetector( - onTap: () { - launchUrlString( - 'https://github.com/soupslurpr/AppVerifier', - mode: LaunchMode - .externalApplication); - }, - child: Text( - tr('about'), - style: const TextStyle( - decoration: + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text(tr( + 'beforeNewInstallsShareToAppVerifier')), + GestureDetector( + onTap: () { + launchUrlString( + 'https://github.com/soupslurpr/AppVerifier', + mode: LaunchMode + .externalApplication); + }, + child: Text( + tr('about'), + style: const TextStyle( + decoration: TextDecoration.underline, - fontSize: 12), - )), - ], - )), + fontSize: 12), + )), + ], + )), Switch( value: settingsProvider .beforeNewInstallsShareToAppVerifier, onChanged: (value) { settingsProvider - .beforeNewInstallsShareToAppVerifier = + .beforeNewInstallsShareToAppVerifier = value; }) ], @@ -531,17 +544,31 @@ class _SettingsPageState extends State { value: settingsProvider.useShizuku, onChanged: (useShizuku) { if (useShizuku) { - ShizukuApkInstaller.checkPermission().then((resCode) { - settingsProvider.useShizuku = resCode!.startsWith('granted'); - switch(resCode){ + ShizukuApkInstaller.checkPermission() + .then((resCode) { + settingsProvider.useShizuku = + resCode!.startsWith('granted'); + switch (resCode) { case 'binder_not_found': - showError(ObtainiumError(tr('shizukuBinderNotFound')), context); + showError( + ObtainiumError(tr( + 'shizukuBinderNotFound')), + context); case 'old_shizuku': - showError(ObtainiumError(tr('shizukuOld')), context); + showError( + ObtainiumError( + tr('shizukuOld')), + context); case 'old_android_with_adb': - showError(ObtainiumError(tr('shizukuOldAndroidWithADB')), context); + showError( + ObtainiumError(tr( + 'shizukuOldAndroidWithADB')), + context); case 'denied': - showError(ObtainiumError(tr('cancelled')), context); + showError( + ObtainiumError( + tr('cancelled')), + context); } }); } else { @@ -566,7 +593,8 @@ class _SettingsPageState extends State { color: Theme.of(context).colorScheme.primary), ), DropdownButtonFormField( - decoration: InputDecoration(labelText: tr('theme')), + decoration: + InputDecoration(labelText: tr('theme')), value: settingsProvider.theme, items: [ DropdownMenuItem( @@ -593,17 +621,17 @@ class _SettingsPageState extends State { height16, if (settingsProvider.theme != ThemeSettings.light) Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible(child: Text(tr('useBlackTheme'))), - Switch( - value: settingsProvider.useBlackTheme, - onChanged: (value) { - settingsProvider.useBlackTheme = value; - } - ) - ] - ), + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Flexible(child: Text(tr('useBlackTheme'))), + Switch( + value: settingsProvider.useBlackTheme, + onChanged: (value) { + settingsProvider.useBlackTheme = + value; + }) + ]), height8, useMaterialThemeSwitch, if (!settingsProvider.useMaterialYou) colorPicker, @@ -624,28 +652,39 @@ class _SettingsPageState extends State { builder: (ctx, val) { return (val.data?.version.sdkInt ?? 0) >= 34 ? Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - height16, - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible(child: Text(tr('useSystemFont'))), - Switch( - value: settingsProvider.useSystemFont, - onChanged: (useSystemFont) { - if (useSystemFont) { - NativeFeatures.loadSystemFont().then((val) { - settingsProvider.useSystemFont = true; - }); - } else { - settingsProvider.useSystemFont = false; - } - }) - ] - ) - ] - ) + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + height16, + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Flexible( + child: Text(tr( + 'useSystemFont'))), + Switch( + value: settingsProvider + .useSystemFont, + onChanged: + (useSystemFont) { + if (useSystemFont) { + NativeFeatures + .loadSystemFont() + .then((val) { + settingsProvider + .useSystemFont = + true; + }); + } else { + settingsProvider + .useSystemFont = + false; + } + }) + ]) + ]) : const SizedBox.shrink(); }, future: DeviceInfoPlugin().androidInfo), @@ -801,17 +840,31 @@ class _SettingsPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - TextButton.icon( + IconButton( onPressed: () { launchUrlString(settingsProvider.sourceUrl, mode: LaunchMode.externalApplication); }, icon: const Icon(Icons.code), - label: Text( - tr('appSource'), - ), + tooltip: tr('appSource'), ), - TextButton.icon( + IconButton( + onPressed: () { + launchUrlString('${settingsProvider.sourceUrl}/wiki', + mode: LaunchMode.externalApplication); + }, + icon: const Icon(Icons.help_outline_rounded), + tooltip: tr('wiki'), + ), + IconButton( + onPressed: () { + launchUrlString('https://apps.obtainium.imranr.dev/', + mode: LaunchMode.externalApplication); + }, + icon: const Icon(Icons.apps_rounded), + tooltip: tr('crowdsourcedConfigsLabel'), + ), + IconButton( onPressed: () { context.read().get().then((logs) { if (logs.isEmpty) { @@ -827,7 +880,7 @@ class _SettingsPageState extends State { }); }, icon: const Icon(Icons.bug_report_outlined), - label: Text(tr('appLogs'))), + tooltip: tr('appLogs')) ], ), const SizedBox( From 0d25b740500bd1aa8da4480ea0d0404302b297ec Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sun, 5 May 2024 22:05:59 -0400 Subject: [PATCH 6/6] Increment version --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 4c0dd75..4daa462 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.1.6+2263 +version: 1.1.7+2264 environment: sdk: '>=3.0.0 <4.0.0'