diff --git a/assets/translations/bs.json b/assets/translations/bs.json index b0296f6..dd9c8be 100644 --- a/assets/translations/bs.json +++ b/assets/translations/bs.json @@ -240,6 +240,10 @@ "disablePageTransitions": "Ugasite animaciju prijelaza stranice", "reversePageTransitions": "Reverzne animacije prijelaza stranice", "minStarCount": "Minimum Star Count", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "Želite li ukloniti aplikaciju?", "other": "Želite li ukloniti aplikacije?" diff --git a/assets/translations/de.json b/assets/translations/de.json index 78911ce..3d709d4 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -233,13 +233,17 @@ "about": "Über", "requiresCredentialsInSettings": "Benötigt zusätzliche Anmeldedaten (in den Einstellungen)", "checkOnStart": "Überprüfe einmalig beim Start", - "tryInferAppIdFromCode": "Try inferring App ID from source code", - "removeOnExternalUninstall": "Automatically remove externally uninstalled Apps", - "pickHighestVersionCode": "Auto-select highest version code APK", - "checkUpdateOnDetailPage": "Check for updates on opening an App detail page", - "disablePageTransitions": "Disable page transition animations", - "reversePageTransitions": "Reverse page transition animations", - "minStarCount": "Minimum Star Count", + "tryInferAppIdFromCode": "Versuche, die App-ID aus dem Quellcode zu ermitteln", + "removeOnExternalUninstall": "Automatisches Entfernen von extern deinstallierten Apps", + "pickHighestVersionCode": "Automatische Auswahl des APK mit höchstem Versionscode", + "checkUpdateOnDetailPage": "Nach Updates suchen, wenn eine App-Detailseite geöffnet wird", + "disablePageTransitions": "Animationen für Seitenübergänge deaktivieren", + "reversePageTransitions": "Umgekehrte Animationen für Seitenübergänge", + "minStarCount": "Minimale Anzahl von Sternen", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "App entfernen?", "other": "Apps entfernen?" diff --git a/assets/translations/en.json b/assets/translations/en.json index d6afd88..e86bf32 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -240,6 +240,10 @@ "disablePageTransitions": "Disable page transition animations", "reversePageTransitions": "Reverse page transition animations", "minStarCount": "Minimum Star Count", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "Remove App?", "other": "Remove Apps?" diff --git a/assets/translations/es.json b/assets/translations/es.json index ad5789e..2708bce 100644 --- a/assets/translations/es.json +++ b/assets/translations/es.json @@ -240,6 +240,10 @@ "disablePageTransitions": "Disable page transition animations", "reversePageTransitions": "Reverse page transition animations", "minStarCount": "Minimum Star Count", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "¿Eliminar Aplicación?", "other": "¿Eliminar Aplicaciones?" diff --git a/assets/translations/fa.json b/assets/translations/fa.json index eaa94a6..781b45b 100644 --- a/assets/translations/fa.json +++ b/assets/translations/fa.json @@ -240,6 +240,10 @@ "disablePageTransitions": "Disable page transition animations", "reversePageTransitions": "Reverse page transition animations", "minStarCount": "Minimum Star Count", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "برنامه حذف شود؟", "other": "برنامه ها حذف شوند؟" diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 6869452..1619faf 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -240,6 +240,10 @@ "disablePageTransitions": "Disable page transition animations", "reversePageTransitions": "Reverse page transition animations", "minStarCount": "Minimum Star Count", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "Supprimer l'application ?", "other": "Supprimer les applications ?" diff --git a/assets/translations/hu.json b/assets/translations/hu.json index 21c11e1..399686d 100644 --- a/assets/translations/hu.json +++ b/assets/translations/hu.json @@ -239,6 +239,10 @@ "disablePageTransitions": "Lap áttűnési animációk tiltása", "reversePageTransitions": "Fordított lap áttűnési animációk", "minStarCount": "Minimális csillag szám", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "Eltávolítja az alkalmazást?", "other": "Eltávolítja az alkalmazást?" diff --git a/assets/translations/it.json b/assets/translations/it.json index 064382e..e905551 100644 --- a/assets/translations/it.json +++ b/assets/translations/it.json @@ -240,6 +240,10 @@ "disablePageTransitions": "Disable page transition animations", "reversePageTransitions": "Reverse page transition animations", "minStarCount": "Minimum Star Count", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "Rimuovere l'app?", "other": "Rimuovere le app?" diff --git a/assets/translations/ja.json b/assets/translations/ja.json index bf70542..58129b4 100644 --- a/assets/translations/ja.json +++ b/assets/translations/ja.json @@ -240,6 +240,10 @@ "disablePageTransitions": "ページ遷移アニメーションを無効化する", "reversePageTransitions": "ページ遷移アニメーションを反転する", "minStarCount": "Minimum Star Count", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "アプリを削除しますか?", "other": "アプリを削除しますか?" diff --git a/assets/translations/pl.json b/assets/translations/pl.json index adbd473..f771b20 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -244,6 +244,10 @@ "disablePageTransitions": "Wyłącz animacje przejścia między stronami", "reversePageTransitions": "Odwróć animacje przejścia pomiędzy stronami", "minStarCount": "Minimalna ilość gwiazdek", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "Usunąć aplikację?", "other": "Usunąć aplikacje?" diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 8ce8341..68f8e6c 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -240,6 +240,10 @@ "disablePageTransitions": "Отключить анимацию перехода между страницами", "reversePageTransitions": "Реверс анимации перехода между страницами", "minStarCount": "Минимальное количество звёзд", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "Удалить приложение?", "other": "Удалить приложения?" diff --git a/assets/translations/zh.json b/assets/translations/zh.json index c622c70..8bed1fa 100644 --- a/assets/translations/zh.json +++ b/assets/translations/zh.json @@ -240,6 +240,10 @@ "disablePageTransitions": "禁用页面过渡动画效果", "reversePageTransitions": "反转页面过渡动画效果", "minStarCount": "最小星标数", + "addInfoBelow": "Add this info below.", + "addInfoInSettings": "Add this info in the Settings.", + "githubSourceNote": "GitHub rate limiting can be avoided using an API key.", + "gitlabSourceNote": "GitLab APK extraction may not work without an API key.", "removeAppQuestion": { "one": "是否删除应用?", "other": "是否删除应用?" diff --git a/lib/app_sources/codeberg.dart b/lib/app_sources/codeberg.dart index 669e0d9..8e9ef04 100644 --- a/lib/app_sources/codeberg.dart +++ b/lib/app_sources/codeberg.dart @@ -9,8 +9,6 @@ class Codeberg extends AppSource { Codeberg() { host = 'codeberg.org'; - additionalSourceSpecificSettingFormItems = []; - additionalSourceAppSpecificSettingFormItems = [ [ GeneratedFormSwitch('includePrereleases', diff --git a/lib/app_sources/github.dart b/lib/app_sources/github.dart index 0f74c47..b6a5e2d 100644 --- a/lib/app_sources/github.dart +++ b/lib/app_sources/github.dart @@ -16,7 +16,7 @@ class GitHub extends AppSource { host = 'github.com'; appIdInferIsOptional = true; - additionalSourceSpecificSettingFormItems = [ + sourceConfigSettingFormItems = [ GeneratedFormTextField('github-creds', label: tr('githubPATLabel'), password: true, @@ -107,7 +107,7 @@ class GitHub extends AppSource { for (var path in possibleBuildGradleLocations) { try { var res = await sourceRequest( - '${await convertStandardUrlToAPIUrl(standardUrl)}/contents/$path'); + '${await convertStandardUrlToAPIUrl(standardUrl, additionalSettings)}/contents/$path'); if (res.statusCode == 200) { try { var body = jsonDecode(res.body); @@ -155,19 +155,30 @@ class GitHub extends AppSource { return url.substring(0, match.end); } - Future getCredentialPrefixIfAny() async { + Future getCredentialPrefixIfAny( + Map additionalSettings) async { SettingsProvider settingsProvider = SettingsProvider(); await settingsProvider.initializeSettings(); - String? creds = settingsProvider - .getSettingString(additionalSourceSpecificSettingFormItems[0].key); + var sourceConfig = + await getSourceConfigValues(additionalSettings, settingsProvider); + String? creds = sourceConfig['github-creds']; return creds != null && creds.isNotEmpty ? '$creds@' : ''; } - Future getAPIHost() async => - 'https://${await getCredentialPrefixIfAny()}api.$host'; + @override + Future getSourceNote() async { + if (!hostChanged && (await getCredentialPrefixIfAny({})).isEmpty) { + return '${tr('githubSourceNote')} ${hostChanged ? tr('addInfoBelow') : tr('addInfoInSettings')}'; + } + return null; + } - Future convertStandardUrlToAPIUrl(String standardUrl) async => - '${await getAPIHost()}/repos${standardUrl.substring('https://$host'.length)}'; + Future getAPIHost(Map additionalSettings) async => + 'https://${await getCredentialPrefixIfAny(additionalSettings)}api.$host'; + + Future convertStandardUrlToAPIUrl( + String standardUrl, Map additionalSettings) async => + '${await getAPIHost(additionalSettings)}/repos${standardUrl.substring('https://$host'.length)}'; @override String? changeLogPageFromStandardUrl(String standardUrl) => @@ -311,7 +322,7 @@ class GitHub extends AppSource { ) async { return await getLatestAPKDetailsCommon2(standardUrl, additionalSettings, (bool useTagUrl) async { - return '${await convertStandardUrlToAPIUrl(standardUrl)}/${useTagUrl ? 'tags' : 'releases'}?per_page=100'; + return '${await convertStandardUrlToAPIUrl(standardUrl, additionalSettings)}/${useTagUrl ? 'tags' : 'releases'}?per_page=100'; }, (Response res) { rateLimitErrorCheck(res); }); @@ -360,7 +371,7 @@ class GitHub extends AppSource { {Map querySettings = const {}}) async { return searchCommon( query, - '${await getAPIHost()}/search/repositories?q=${Uri.encodeQueryComponent(query)}&per_page=100', + '${await getAPIHost({})}/search/repositories?q=${Uri.encodeQueryComponent(query)}&per_page=100', 'items', onHttpErrorCode: (Response res) { rateLimitErrorCheck(res); }, querySettings: querySettings); diff --git a/lib/app_sources/gitlab.dart b/lib/app_sources/gitlab.dart index ec2fd94..bea24eb 100644 --- a/lib/app_sources/gitlab.dart +++ b/lib/app_sources/gitlab.dart @@ -16,7 +16,7 @@ class GitLab extends AppSource { host = 'gitlab.com'; canSearch = true; - additionalSourceSpecificSettingFormItems = [ + sourceConfigSettingFormItems = [ GeneratedFormTextField('gitlab-creds', label: tr('gitlabPATLabel'), password: true, @@ -60,18 +60,27 @@ class GitLab extends AppSource { return url.substring(0, match.end); } - Future getPATIfAny() async { + Future getPATIfAny(Map additionalSettings) async { SettingsProvider settingsProvider = SettingsProvider(); await settingsProvider.initializeSettings(); - String? creds = settingsProvider - .getSettingString(additionalSourceSpecificSettingFormItems[0].key); + var sourceConfig = + await getSourceConfigValues(additionalSettings, settingsProvider); + String? creds = sourceConfig['gitlab-creds']; return creds != null && creds.isNotEmpty ? creds : null; } + @override + Future getSourceNote() async { + if ((await getPATIfAny({})) == null) { + return '${tr('gitlabSourceNote')} ${hostChanged ? tr('addInfoBelow') : tr('addInfoInSettings')}'; + } + return null; + } + @override Future>> search(String query, {Map querySettings = const {}}) async { - String? PAT = await getPATIfAny(); + String? PAT = await getPATIfAny({}); if (PAT == null) { throw CredsNeededError(name); } @@ -103,7 +112,7 @@ class GitLab extends AppSource { ) async { bool fallbackToOlderReleases = additionalSettings['fallbackToOlderReleases'] == true; - String? PAT = await getPATIfAny(); + String? PAT = await getPATIfAny(hostChanged ? additionalSettings : {}); Iterable apkDetailsList = []; if (PAT != null) { var names = GitHub().getAppNames(standardUrl); diff --git a/lib/main.dart b/lib/main.dart index 51c252c..d330268 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,6 +3,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:http/http.dart'; import 'package:obtainium/custom_errors.dart'; import 'package:obtainium/pages/home.dart'; import 'package:obtainium/providers/apps_provider.dart'; @@ -21,7 +22,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart'; // ignore: implementation_imports import 'package:easy_localization/src/localization.dart'; -const String currentVersion = '0.13.21'; +const String currentVersion = '0.13.22'; const String currentReleaseTag = 'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES @@ -101,10 +102,15 @@ Future bgUpdateCheck(int taskId, Map? params) async { await appsProvider.checkUpdates( ignoreAppsCheckedAfter: ignoreAfter, throwErrorsForRetry: true); } catch (e) { - if (e is RateLimitError || e is SocketException) { + if (e is RateLimitError || e is ClientException) { var remainingMinutes = e is RateLimitError ? e.remainingMinutes : 15; - logs.add(plural('bgUpdateGotErrorRetryInMinutes', remainingMinutes, - args: [e.toString(), remainingMinutes.toString()])); + logs.add( + plural('bgUpdateGotErrorRetryInMinutes', remainingMinutes, args: [ + e is ClientException + ? '${(e).message}, ${e.uri?.path}' + : e.toString(), + remainingMinutes.toString() + ])); AndroidAlarmManager.oneShot(Duration(minutes: remainingMinutes), Random().nextInt(pow(2, 31) as int), bgUpdateCheck, params: { 'ignoreAfterMicroseconds': nextIgnoreAfter.microsecondsSinceEpoch diff --git a/lib/mass_app_sources/githubstars.dart b/lib/mass_app_sources/githubstars.dart index 5a086f1..db8495b 100644 --- a/lib/mass_app_sources/githubstars.dart +++ b/lib/mass_app_sources/githubstars.dart @@ -16,7 +16,7 @@ class GitHubStars implements MassAppUrlSource { Future>> getOnePageOfUserStarredUrlsWithDescriptions( String username, int page) async { Response res = await get(Uri.parse( - 'https://${await GitHub().getCredentialPrefixIfAny()}api.github.com/users/$username/starred?per_page=100&page=$page')); + 'https://${await GitHub().getCredentialPrefixIfAny({})}api.github.com/users/$username/starred?per_page=100&page=$page')); if (res.statusCode == 200) { Map> urlsWithDescriptions = {}; for (var e in (jsonDecode(res.body) as List)) { diff --git a/lib/pages/add_app.dart b/lib/pages/add_app.dart index b31dc4d..0f8095c 100644 --- a/lib/pages/add_app.dart +++ b/lib/pages/add_app.dart @@ -41,6 +41,7 @@ class _AddAppPageState extends State { @override Widget build(BuildContext context) { AppsProvider appsProvider = context.read(); + SettingsProvider settingsProvider = context.watch(); bool doingSomething = gettingAppInfo || searching; @@ -85,8 +86,7 @@ class _AddAppPageState extends State { } } - Future getTrackOnlyConfirmationIfNeeded( - bool userPickedTrackOnly, SettingsProvider settingsProvider, + Future getTrackOnlyConfirmationIfNeeded(bool userPickedTrackOnly, {bool ignoreHideSetting = false}) async { var useTrackOnly = userPickedTrackOnly || pickedSource!.enforceTrackOnly; if (useTrackOnly && @@ -138,11 +138,9 @@ class _AddAppPageState extends State { gettingAppInfo = true; }); try { - var settingsProvider = context.read(); var userPickedTrackOnly = additionalSettings['trackOnly'] == true; App? app; - if ((await getTrackOnlyConfirmationIfNeeded( - userPickedTrackOnly, settingsProvider)) && + if ((await getTrackOnlyConfirmationIfNeeded(userPickedTrackOnly)) && (await getReleaseDateAsVersionConfirmationIfNeeded( userPickedTrackOnly))) { var trackOnly = pickedSource!.enforceTrackOnly || userPickedTrackOnly; @@ -410,7 +408,13 @@ class _AddAppPageState extends State { ), GeneratedForm( key: Key(pickedSource.runtimeType.toString()), - items: pickedSource!.combinedAppSpecificSettingFormItems, + items: [ + ...pickedSource!.combinedAppSpecificSettingFormItems, + ...(pickedSourceOverride != null + ? pickedSource!.sourceConfigSettingFormItems + .map((e) => [e]) + : []) + ], onValueChanges: (values, valid, isBuilding) { if (!isBuilding) { setState(() { @@ -504,6 +508,18 @@ class _AddAppPageState extends State { HTML().runtimeType.toString())) getHTMLSourceOverrideDropdown(), if (shouldShowSearchBar()) getSearchBarRow(), + if (pickedSource != null) + FutureBuilder( + builder: (ctx, val) { + return val.data != null && val.data!.isNotEmpty + ? Text( + val.data!, + style: + Theme.of(context).textTheme.bodySmall, + ) + : const SizedBox(); + }, + future: pickedSource?.getSourceNote()), const SizedBox( height: 16, ), diff --git a/lib/pages/app.dart b/lib/pages/app.dart index 4d97d54..0708b02 100644 --- a/lib/pages/app.dart +++ b/lib/pages/app.dart @@ -431,8 +431,7 @@ class _AppPageState extends State { ? getResetInstallStatusButton() : getInstallOrUpdateButton()), const SizedBox(width: 16.0), - Expanded( - child: TextButton( + IconButton( onPressed: app?.downloadProgress != null ? null : () { @@ -445,13 +444,9 @@ class _AppPageState extends State { } }); }, - style: TextButton.styleFrom( - foregroundColor: - Theme.of(context).colorScheme.error, - surfaceTintColor: - Theme.of(context).colorScheme.error), - child: Text(tr('remove')), - )), + tooltip: tr('remove'), + icon: const Icon(Icons.delete_outline), + ), ])), if (app?.downloadProgress != null) Padding( diff --git a/lib/pages/apps.dart b/lib/pages/apps.dart index 173beb2..894967e 100644 --- a/lib/pages/apps.dart +++ b/lib/pages/apps.dart @@ -543,20 +543,19 @@ class AppsPageState extends State { : FontWeight.normal)), trailing: listedApps[index].downloadProgress != null ? SizedBox( - width: 90, child: Text( - listedApps[index].downloadProgress! >= 0 - ? tr('percentProgress', args: [ - listedApps[index] - .downloadProgress! - .toInt() - .toString() - ]) - : tr('pleaseWait'), - textAlign: (listedApps[index].downloadProgress! >= 0) - ? TextAlign.start - : TextAlign.end, - )) + listedApps[index].downloadProgress! >= 0 + ? tr('percentProgress', args: [ + listedApps[index] + .downloadProgress! + .toInt() + .toString() + ]) + : tr('pleaseWait'), + textAlign: (listedApps[index].downloadProgress! >= 0) + ? TextAlign.start + : TextAlign.end, + )) : trailingRow, onTap: () { if (selectedAppIds.isNotEmpty) { diff --git a/lib/pages/settings.dart b/lib/pages/settings.dart index 2a42376..c96c72d 100644 --- a/lib/pages/settings.dart +++ b/lib/pages/settings.dart @@ -166,9 +166,9 @@ class _SettingsPageState extends State { }); var sourceSpecificFields = sourceProvider.sources.map((e) { - if (e.additionalSourceSpecificSettingFormItems.isNotEmpty) { + if (e.sourceConfigSettingFormItems.isNotEmpty) { return GeneratedForm( - items: e.additionalSourceSpecificSettingFormItems.map((e) { + items: e.sourceConfigSettingFormItems.map((e) { e.defaultValue = settingsProvider.getSettingString(e.key); return [e]; }).toList(), diff --git a/lib/providers/apps_provider.dart b/lib/providers/apps_provider.dart index 7bd83be..9c8d7db 100644 --- a/lib/providers/apps_provider.dart +++ b/lib/providers/apps_provider.dart @@ -154,6 +154,7 @@ class AppsProvider with ChangeNotifier { 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, useExisting: useExisting, headers: headers, retries: (retries - 1)); } else { diff --git a/lib/providers/source_provider.dart b/lib/providers/source_provider.dart index 8ddea20..ca2c969 100644 --- a/lib/providers/source_provider.dart +++ b/lib/providers/source_provider.dart @@ -28,6 +28,7 @@ import 'package:obtainium/app_sources/vlc.dart'; import 'package:obtainium/components/generated_form.dart'; import 'package:obtainium/custom_errors.dart'; import 'package:obtainium/mass_app_sources/githubstars.dart'; +import 'package:obtainium/providers/settings_provider.dart'; class AppNames { late String author; @@ -424,12 +425,31 @@ abstract class AppSource { } // Some Sources may have additional settings at the Source level (not specific to Apps) - these use SettingsProvider - List additionalSourceSpecificSettingFormItems = []; + // If the source has been overridden, we expect the user to define one-time values as additional settings - don't use the stored values + List sourceConfigSettingFormItems = []; + Future> getSourceConfigValues( + Map additionalSettings, + SettingsProvider settingsProvider) async { + Map results = {}; + sourceConfigSettingFormItems.forEach((e) { + var val = hostChanged + ? additionalSettings[e.key] + : settingsProvider.getSettingString(e.key); + if (val != null) { + results[e.key] = val; + } + }); + return results; + } String? changeLogPageFromStandardUrl(String standardUrl) { return null; } + Future getSourceNote() async { + return null; + } + Future apkUrlPrefetchModifier( String apkUrl, String standardUrl) async { return apkUrl; diff --git a/pubspec.lock b/pubspec.lock index 662156b..c4ff360 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -695,18 +695,18 @@ packages: dependency: "direct main" description: name: sqflite - sha256: b4d6710e1200e96845747e37338ea8a819a12b51689a3bcf31eff0003b37a0b9 + sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a" url: "https://pub.dev" source: hosted - version: "2.2.8+4" + version: "2.3.0" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "8f7603f3f8f126740bc55c4ca2d1027aab4b74a1267a3e31ce51fe40e3b65b8f" + sha256: "1b92f368f44b0dee2425bb861cfa17b6f6cf3961f762ff6f941d20b33355660a" url: "https://pub.dev" source: hosted - version: "2.4.5+1" + version: "2.5.0" stack_trace: dependency: transitive description: @@ -863,10 +863,10 @@ packages: dependency: transitive description: name: webview_flutter_android - sha256: "8587d0b4991bd0f223f4b4957101c2c7449f905601571315f4967072498dd3fb" + sha256: d936a09fbfd08cb78f7329e0bbacf6158fbdfe24ffc908b22444c07d295eb193 url: "https://pub.dev" source: hosted - version: "3.9.1" + version: "3.9.2" webview_flutter_platform_interface: dependency: transitive description: @@ -879,18 +879,18 @@ packages: dependency: transitive description: name: webview_flutter_wkwebview - sha256: "3e36a8f564809cb7c257ff4278502b185e2191349df0ddee98837f91805c74b8" + sha256: "5fa098f28b606f699e8ca52d9e4e11edbbfef65189f5f77ae92703ba5408fd25" url: "https://pub.dev" source: hosted - version: "3.7.1" + version: "3.7.2" win32: dependency: transitive description: name: win32 - sha256: dfdf0136e0aa7a1b474ea133e67cb0154a0acd2599c4f3ada3b49d38d38793ee + sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0 url: "https://pub.dev" source: hosted - version: "5.0.5" + version: "5.0.6" win32_registry: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 9cdc749..8f84e5d 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: 0.13.21+185 # When changing this, update the tag in main() accordingly +version: 0.13.22+186 # When changing this, update the tag in main() accordingly environment: sdk: '>=2.18.2 <3.0.0'