Merge pull request #1439 from ImranR98/dev

- Allow any source to be overridden (#1420)
- Bugfix for installing apps with ID change step (#1424)
- Bugfix: 'null' changelog for some track-only apps (#1425)
- Show latest APK name/count on app page (#1426)
- More BG update interval options (#1431)
This commit is contained in:
Imran
2024-03-01 20:37:02 -05:00
committed by GitHub
27 changed files with 131 additions and 73 deletions

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Uklonite zastarjeli filter aplikacija", "removeOutdatedFilter": "Uklonite zastarjeli filter aplikacija",
"showOutdatedOnly": "Prikaži samo zastarjele aplikacije", "showOutdatedOnly": "Prikaži samo zastarjele aplikacije",
"filter": "Filtriranje", "filter": "Filtriranje",
"filterActive": "Filtriranje",
"filterApps": "Filtriraj aplikacije", "filterApps": "Filtriraj aplikacije",
"appName": "Naziv aplikacije", "appName": "Naziv aplikacije",
"author": "Autor", "author": "Autor",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} i još jedna aplikacija je vjerovatno ažurirana.", "one": "{} i još jedna aplikacija je vjerovatno ažurirana.",
"other": "{} i još {} aplikacija su vjerovatno ažurirane." "other": "{} i još {} aplikacija su vjerovatno ažurirane."
},
"apk": {
"one": "{} APK",
"other": "{} APKs"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Odstranit filtr Neaktuální", "removeOutdatedFilter": "Odstranit filtr Neaktuální",
"showOutdatedOnly": "Zobrazovat pouze zastaralé aplikace", "showOutdatedOnly": "Zobrazovat pouze zastaralé aplikace",
"filter": "Filtr", "filter": "Filtr",
"filterActive": "Filtr *",
"filterApps": "Filtrovat aplikace", "filterApps": "Filtrovat aplikace",
"appName": "Název aplikace", "appName": "Název aplikace",
"author": "Autor", "author": "Autor",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} a 1 další aplikace možno aktualizovat", "one": "{} a 1 další aplikace možno aktualizovat",
"other": "{} a {} další aplikace mohou být aktualizovány." "other": "{} a {} další aplikace mohou být aktualizovány."
},
"apk": {
"one": "{} APK",
"other": "{} APK"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "App-Filter Nicht aktuell entfernen", "removeOutdatedFilter": "App-Filter Nicht aktuell entfernen",
"showOutdatedOnly": "Nur nicht aktuelle Apps anzeigen", "showOutdatedOnly": "Nur nicht aktuelle Apps anzeigen",
"filter": "Filter", "filter": "Filter",
"filterActive": "Filter *",
"filterApps": "Apps filtern", "filterApps": "Apps filtern",
"appName": "App Name", "appName": "App Name",
"author": "Autor", "author": "Autor",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} und 1 weitere Anwendung wurden möglicherweise aktualisiert.", "one": "{} und 1 weitere Anwendung wurden möglicherweise aktualisiert.",
"other": "{} und {} weitere Anwendungen wurden möglicherweise aktualisiert." "other": "{} und {} weitere Anwendungen wurden möglicherweise aktualisiert."
},
"apk": {
"one": "{} APK",
"other": "{} APKs"
} }
} }

View File

@@ -351,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} and 1 more app may have been updated.", "one": "{} and 1 more app may have been updated.",
"other": "{} and {} more apps may have been updated." "other": "{} and {} more apps may have been updated."
},
"apk": {
"one": "{} APK",
"other": "{} APKs"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Elimiar filtro de aplicaciones desactualizado", "removeOutdatedFilter": "Elimiar filtro de aplicaciones desactualizado",
"showOutdatedOnly": "Mostrar solo aplicaciones desactualizadas", "showOutdatedOnly": "Mostrar solo aplicaciones desactualizadas",
"filter": "Filtrar", "filter": "Filtrar",
"filterActive": "Filtrar *",
"filterApps": "Filtrar Actualizaciones", "filterApps": "Filtrar Actualizaciones",
"appName": "Nombre de la aplicación", "appName": "Nombre de la aplicación",
"author": "Autor", "author": "Autor",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} y 1 aplicación más podría haber sido actualizada.", "one": "{} y 1 aplicación más podría haber sido actualizada.",
"other": "{} y {} aplicaciones más podrían haber sido actualizadas." "other": "{} y {} aplicaciones más podrían haber sido actualizadas."
},
"apk": {
"one": "{} APK",
"other": "{} APKs"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "فیلتر برنامه قدیمی را حذف کنید", "removeOutdatedFilter": "فیلتر برنامه قدیمی را حذف کنید",
"showOutdatedOnly": "فقط برنامه های قدیمی را نشان دهید", "showOutdatedOnly": "فقط برنامه های قدیمی را نشان دهید",
"filter": "فیلتر", "filter": "فیلتر",
"filterActive": "فیلتر *",
"filterApps": "فیلتر کردن برنامه ها", "filterApps": "فیلتر کردن برنامه ها",
"appName": "نام برنامه", "appName": "نام برنامه",
"author": "سازنده", "author": "سازنده",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} و 1 برنامه دیگر ممکن است به روز شده باشند.", "one": "{} و 1 برنامه دیگر ممکن است به روز شده باشند.",
"other": "ممکن است {} و {} برنامه های دیگر به روز شده باشند." "other": "ممکن است {} و {} برنامه های دیگر به روز شده باشند."
},
"apk": {
"one": "{} APK",
"other": "{} APKs"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Supprimer le filtre d'application obsolète", "removeOutdatedFilter": "Supprimer le filtre d'application obsolète",
"showOutdatedOnly": "Afficher uniquement les applications obsolètes", "showOutdatedOnly": "Afficher uniquement les applications obsolètes",
"filter": "Filtre", "filter": "Filtre",
"filterActive": "Filtre *",
"filterApps": "Filtrer les applications", "filterApps": "Filtrer les applications",
"appName": "Nom de l'application", "appName": "Nom de l'application",
"author": "Auteur", "author": "Auteur",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"une": "{} et 1 application supplémentaire ont peut-être été mises à jour.", "une": "{} et 1 application supplémentaire ont peut-être été mises à jour.",
"other": "{} et {} autres applications peuvent avoir été mises à jour." "other": "{} et {} autres applications peuvent avoir été mises à jour."
},
"apk": {
"one": "{} APK",
"other": "{} APKs"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Távolítsa el az elavult app szűrőt", "removeOutdatedFilter": "Távolítsa el az elavult app szűrőt",
"showOutdatedOnly": "Csak az elavult appok megjelenítése", "showOutdatedOnly": "Csak az elavult appok megjelenítése",
"filter": "Szűrő", "filter": "Szűrő",
"filterActive": "Szűrő *",
"filterApps": "Appok szűrése", "filterApps": "Appok szűrése",
"appName": "App név", "appName": "App név",
"author": "Szerző", "author": "Szerző",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} és 1 további alkalmazás is frissült.", "one": "{} és 1 további alkalmazás is frissült.",
"other": "{} és {} további alkalmazás is frissült." "other": "{} és {} további alkalmazás is frissült."
},
"apk": {
"one": "{} APK",
"other": "{} APK-k"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Rimuovi il filtro per le app non aggiornate", "removeOutdatedFilter": "Rimuovi il filtro per le app non aggiornate",
"showOutdatedOnly": "Mostra solo le app non aggiornate", "showOutdatedOnly": "Mostra solo le app non aggiornate",
"filter": "Filtri", "filter": "Filtri",
"filterActive": "Filtri *",
"filterApps": "Filtra app", "filterApps": "Filtra app",
"appName": "Nome dell'app", "appName": "Nome dell'app",
"author": "Autore", "author": "Autore",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} e un'altra app potrebbero essere state aggiornate.", "one": "{} e un'altra app potrebbero essere state aggiornate.",
"other": "{} e altre {} app potrebbero essere state aggiornate." "other": "{} e altre {} app potrebbero essere state aggiornate."
},
"apk": {
"one": "{} APK",
"other": "{} APK"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "アップデートが存在するアプリのフィルターを解除", "removeOutdatedFilter": "アップデートが存在するアプリのフィルターを解除",
"showOutdatedOnly": "アップデートが存在するアプリのみ表示する", "showOutdatedOnly": "アップデートが存在するアプリのみ表示する",
"filter": "フィルター", "filter": "フィルター",
"filterActive": "フィルター *",
"filterApps": "アプリをフィルタリングする", "filterApps": "アプリをフィルタリングする",
"appName": "アプリ名", "appName": "アプリ名",
"author": "作者", "author": "作者",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} とさらに 1 個のアプリがアップデートされた可能性があります。", "one": "{} とさらに 1 個のアプリがアップデートされた可能性があります。",
"other": "{} とさらに {} 個のアプリがアップデートされた可能性があります。" "other": "{} とさらに {} 個のアプリがアップデートされた可能性があります。"
},
"apk": {
"one": "{}APK",
"other": "{}APK"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Verwijder out-of-date app filter", "removeOutdatedFilter": "Verwijder out-of-date app filter",
"showOutdatedOnly": "Toon alleen out-of-date apps", "showOutdatedOnly": "Toon alleen out-of-date apps",
"filter": "Filter", "filter": "Filter",
"filterActive": "Filteren *",
"filterApps": "Filter apps", "filterApps": "Filter apps",
"appName": "App naam", "appName": "App naam",
"author": "Auteur", "author": "Auteur",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} en nog 1 app zijn mogelijk bijgewerkt.", "one": "{} en nog 1 app zijn mogelijk bijgewerkt.",
"other": "{} en {} meer apps zijn mogelijk bijgwerkt." "other": "{} en {} meer apps zijn mogelijk bijgwerkt."
},
"apk": {
"one": "{} APK",
"other": "{} APK's"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Usuń filtr nieaktualnych aplikacji", "removeOutdatedFilter": "Usuń filtr nieaktualnych aplikacji",
"showOutdatedOnly": "Pokaż tylko nieaktualne aplikacje", "showOutdatedOnly": "Pokaż tylko nieaktualne aplikacje",
"filter": "FIltr", "filter": "FIltr",
"filterActive": "Filtruj *",
"filterApps": "Filtruj aplikacje", "filterApps": "Filtruj aplikacje",
"appName": "Nazwa aplikacji", "appName": "Nazwa aplikacji",
"author": "Autor", "author": "Autor",
@@ -378,5 +377,9 @@
"few": "{} i {} inne apki mogły zostać zaktualizowane.", "few": "{} i {} inne apki mogły zostać zaktualizowane.",
"many": "{} i {} innych apek mogło zostać zaktualizowanych.", "many": "{} i {} innych apek mogło zostać zaktualizowanych.",
"other": "{} i {} inne apki mogły zostać zaktualizowane." "other": "{} i {} inne apki mogły zostać zaktualizowane."
},
"apk": {
"one": "{} APK",
"other": "{} APK"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Remover filtro de aplicativos desatualizados", "removeOutdatedFilter": "Remover filtro de aplicativos desatualizados",
"showOutdatedOnly": "Mostrar apenas aplicativos desatualizados", "showOutdatedOnly": "Mostrar apenas aplicativos desatualizados",
"filter": "Filtro", "filter": "Filtro",
"filterActive": "Filtro *",
"filterApps": "Filtrar aplicativos", "filterApps": "Filtrar aplicativos",
"appName": "Nome do aplicativo", "appName": "Nome do aplicativo",
"author": "Autor", "author": "Autor",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} e um outro aplicativo podem ter sido atualizados.", "one": "{} e um outro aplicativo podem ter sido atualizados.",
"other": "{} e {} outros aplicativos podem ter sido atualizados." "other": "{} e {} outros aplicativos podem ter sido atualizados."
},
"apk": {
"one": "{} APK",
"other": "{} APKs"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Удалить фильтр для устаревших приложений", "removeOutdatedFilter": "Удалить фильтр для устаревших приложений",
"showOutdatedOnly": "Показывать только устаревшие приложения", "showOutdatedOnly": "Показывать только устаревшие приложения",
"filter": "Фильтр", "filter": "Фильтр",
"filterActive": "Фильтр *",
"filterApps": "Фильтровать приложения", "filterApps": "Фильтровать приложения",
"appName": "Название приложения", "appName": "Название приложения",
"author": "Автор", "author": "Автор",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} и ещё 1 приложение могли быть обновлены", "one": "{} и ещё 1 приложение могли быть обновлены",
"other": "{} и ещё {} приложений могли быть обновлены" "other": "{} и ещё {} приложений могли быть обновлены"
},
"apk": {
"one": "{} APK",
"other": "{} APKs"
} }
} }

View File

@@ -58,11 +58,10 @@ const main = async () => {
return `${translationsDir}/${f}` return `${translationsDir}/${f}`
}).filter(f => f.endsWith('.json') && f != templateFile) }).filter(f => f.endsWith('.json') && f != templateFile)
const templateTranslation = require(templateFile) const templateTranslation = JSON.parse(fs.readFileSync(templateFile).toString())
otherFiles.forEach(file => { otherFiles.forEach(file => {
const thisTranslationOriginal = require(file) const thisTranslationOriginal = JSON.parse(fs.readFileSync((file).toString()))
const thisTranslationNew = {} const thisTranslationNew = {}
Object.keys(templateTranslation).forEach(k => { Object.keys(templateTranslation).forEach(k => {
thisTranslationNew[k] = thisTranslationOriginal[k] || templateTranslation[k] thisTranslationNew[k] = thisTranslationOriginal[k] || templateTranslation[k]
@@ -72,7 +71,7 @@ const main = async () => {
for (let i in otherFiles) { for (let i in otherFiles) {
const file = otherFiles[i] const file = otherFiles[i]
const thisTranslation = require(file) const thisTranslation = JSON.parse(fs.readFileSync((file).toString()))
const translationKeys = Object.keys(templateTranslation) const translationKeys = Object.keys(templateTranslation)
for (let j in translationKeys) { for (let j in translationKeys) {
const k = translationKeys[j] const k = translationKeys[j]

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Ta bort Utgånga App-filtret", "removeOutdatedFilter": "Ta bort Utgånga App-filtret",
"showOutdatedOnly": "Visa Endast Utgånga Appar", "showOutdatedOnly": "Visa Endast Utgånga Appar",
"filter": "Filtrera", "filter": "Filtrera",
"filterActive": "Filter *",
"filterApps": "Filtrera Appar", "filterApps": "Filtrera Appar",
"appName": "Appnamn", "appName": "Appnamn",
"author": "Utvecklare", "author": "Utvecklare",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} och 1 till app kan ha uppdaterats.", "one": "{} och 1 till app kan ha uppdaterats.",
"other": "{} och {} appar till kan ha uppdaterats." "other": "{} och {} appar till kan ha uppdaterats."
},
"apk": {
"one": "{} APK",
"other": "{} APK:er"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "Güncel Olmayan Uygulama Filtresini Kaldır", "removeOutdatedFilter": "Güncel Olmayan Uygulama Filtresini Kaldır",
"showOutdatedOnly": "Yalnızca Güncel Olmayan Uygulamaları Göster", "showOutdatedOnly": "Yalnızca Güncel Olmayan Uygulamaları Göster",
"filter": "Filtre", "filter": "Filtre",
"filterActive": "Filtre *",
"filterApps": "Uygulamaları Filtrele", "filterApps": "Uygulamaları Filtrele",
"appName": "Uygulama Adı", "appName": "Uygulama Adı",
"author": "Yazar", "author": "Yazar",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} ve 1 diğer uygulama muhtemelen güncellendi.", "one": "{} ve 1 diğer uygulama muhtemelen güncellendi.",
"other": "{} ve {} daha fazla uygulama muhtemelen güncellendi." "other": "{} ve {} daha fazla uygulama muhtemelen güncellendi."
},
"apk": {
"one": "{} APK",
"other": "{} APK'lar"
} }
} }

View File

@@ -351,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} và 1 ứng dụng khác có thể đã được cập nhật.", "one": "{} và 1 ứng dụng khác có thể đã được cập nhật.",
"other": "{} và {} ứng dụng khác có thể đã được cập nhật." "other": "{} và {} ứng dụng khác có thể đã được cập nhật."
},
"apk": {
"one": "{} APK",
"other": "{} APKs"
} }
} }

View File

@@ -80,7 +80,6 @@
"removeOutdatedFilter": "删除失效的应用筛选", "removeOutdatedFilter": "删除失效的应用筛选",
"showOutdatedOnly": "只显示待更新应用", "showOutdatedOnly": "只显示待更新应用",
"filter": "筛选", "filter": "筛选",
"filterActive": "筛选 *",
"filterApps": "筛选应用", "filterApps": "筛选应用",
"appName": "应用名称", "appName": "应用名称",
"author": "作者", "author": "作者",
@@ -352,5 +351,9 @@
"xAndNMoreUpdatesPossiblyInstalled": { "xAndNMoreUpdatesPossiblyInstalled": {
"one": "{} 和另外 1 个应用已尝试更新。", "one": "{} 和另外 1 个应用已尝试更新。",
"other": "“{}”和另外 {} 个应用已尝试更新。" "other": "“{}”和另外 {} 个应用已尝试更新。"
},
"apk": {
"one": "{}APK",
"other": "{}APK"
} }
} }

View File

@@ -400,7 +400,7 @@ class GitHub extends AppSource {
if (version == null) { if (version == null) {
throw NoVersionError(); throw NoVersionError();
} }
var changeLog = targetRelease['body'].toString(); var changeLog = (targetRelease['body'] ?? '').toString();
return APKDetails( return APKDetails(
version, version,
targetRelease['apkUrls'] as List<MapEntry<String, String>>, targetRelease['apkUrls'] as List<MapEntry<String, String>>,

View File

@@ -1,7 +1,6 @@
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:obtainium/app_sources/html.dart';
import 'package:obtainium/components/custom_app_bar.dart'; import 'package:obtainium/components/custom_app_bar.dart';
import 'package:obtainium/components/generated_form.dart'; import 'package:obtainium/components/generated_form.dart';
import 'package:obtainium/components/generated_form_modal.dart'; import 'package:obtainium/components/generated_form_modal.dart';
@@ -62,18 +61,6 @@ class AddAppPageState extends State<AddAppPage> {
var prevHost = pickedSource?.hosts.isNotEmpty == true var prevHost = pickedSource?.hosts.isNotEmpty == true
? pickedSource?.hosts[0] ? pickedSource?.hosts[0]
: null; : null;
try {
var naturalSource =
valid ? sourceProvider.getSource(userInput) : null;
if (naturalSource != null &&
naturalSource.runtimeType.toString() !=
HTML().runtimeType.toString()) {
// If input has changed to match a regular source, reset the override
pickedSourceOverride = null;
}
} catch (e) {
// ignore
}
var source = valid var source = valid
? sourceProvider.getSource(userInput, ? sourceProvider.getSource(userInput,
overrideSource: pickedSourceOverride) overrideSource: pickedSourceOverride)
@@ -361,8 +348,9 @@ class AddAppPageState extends State<AddAppPage> {
[ [
GeneratedFormDropdown( GeneratedFormDropdown(
'overrideSource', 'overrideSource',
defaultValue: HTML().runtimeType.toString(), defaultValue: '',
[ [
MapEntry('', tr('none')),
...sourceProvider.sources.map( ...sourceProvider.sources.map(
(s) => MapEntry(s.runtimeType.toString(), s.name)) (s) => MapEntry(s.runtimeType.toString(), s.name))
], ],
@@ -577,11 +565,7 @@ class AddAppPageState extends State<AddAppPage> {
const SizedBox( const SizedBox(
height: 16, height: 16,
), ),
if (pickedSourceOverride != null || if (pickedSource != null) getHTMLSourceOverrideDropdown(),
(pickedSource != null &&
pickedSource.runtimeType.toString() ==
HTML().runtimeType.toString()))
getHTMLSourceOverrideDropdown(),
if (shouldShowSearchBar()) getSearchBarRow(), if (shouldShowSearchBar()) getSearchBarRow(),
if (pickedSource != null) if (pickedSource != null)
FutureBuilder( FutureBuilder(

View File

@@ -104,6 +104,10 @@ class _AppPageState extends State<AppPage> {
if (installedVersionIsEstimate) { if (installedVersionIsEstimate) {
infoLines = '${tr('pseudoVersionInUse')}\n$infoLines'; infoLines = '${tr('pseudoVersionInUse')}\n$infoLines';
} }
if ((app?.app.apkUrls.length ?? 0) > 0) {
infoLines =
'$infoLines\n${app?.app.apkUrls.length == 1 ? app?.app.apkUrls[0].key : plural('apk', app?.app.apkUrls.length ?? 0)}';
}
return Column( return Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,

View File

@@ -717,7 +717,7 @@ class AppsProvider with ChangeNotifier {
appsToInstall = appsToInstall =
moveStrToEnd(appsToInstall, obtainiumId, strB: obtainiumTempId); moveStrToEnd(appsToInstall, obtainiumId, strB: obtainiumTempId);
Future<void> updateFn(String id, {bool skipInstalls = false}) async { Future<String> updateFn(String id, {bool skipInstalls = false}) async {
try { try {
var downloadedArtifact = var downloadedArtifact =
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
@@ -730,8 +730,8 @@ class AppsProvider with ChangeNotifier {
} else { } else {
downloadedDir = downloadedArtifact as DownloadedXApkDir; downloadedDir = downloadedArtifact as DownloadedXApkDir;
} }
var appId = downloadedFile?.appId ?? downloadedDir!.appId; id = downloadedFile?.appId ?? downloadedDir!.appId;
bool willBeSilent = await canInstallSilently(apps[appId]!.app); bool willBeSilent = await canInstallSilently(apps[id]!.app);
switch (settingsProvider.installMethod) { switch (settingsProvider.installMethod) {
case InstallMethodSettings.normal: case InstallMethodSettings.normal:
if (!(await settingsProvider.getInstallPermission( if (!(await settingsProvider.getInstallPermission(
@@ -773,18 +773,19 @@ class AppsProvider with ChangeNotifier {
} }
if (willBeSilent && context == null) { if (willBeSilent && context == null) {
notificationsProvider?.notify(SilentUpdateAttemptNotification( notificationsProvider?.notify(SilentUpdateAttemptNotification(
[apps[appId]!.app], [apps[id]!.app],
id: appId.hashCode)); id: id.hashCode));
} }
installedIds.add(id);
} }
} finally { } finally {
apps[id]?.downloadProgress = null; apps[id]?.downloadProgress = null;
notifyListeners(); notifyListeners();
} }
installedIds.add(id);
} catch (e) { } catch (e) {
errors.add(id, e, appName: apps[id]?.name); errors.add(id, e, appName: apps[id]?.name);
} }
return id;
} }
if (forceParallelDownloads || !settingsProvider.parallelDownloads) { if (forceParallelDownloads || !settingsProvider.parallelDownloads) {
@@ -792,9 +793,9 @@ class AppsProvider with ChangeNotifier {
await updateFn(id); await updateFn(id);
} }
} else { } else {
await Future.wait( List<String> ids = await Future.wait(
appsToInstall.map((id) => updateFn(id, skipInstalls: true))); appsToInstall.map((id) => updateFn(id, skipInstalls: true)));
for (var id in appsToInstall) { for (var id in ids) {
if (!errors.appIdNames.containsKey(id)) { if (!errors.appIdNames.containsKey(id)) {
await updateFn(id); await updateFn(id);
} }

View File

@@ -30,8 +30,22 @@ enum SortOrderSettings { ascending, descending }
const maxAPIRateLimitMinutes = 30; const maxAPIRateLimitMinutes = 30;
const minUpdateIntervalMinutes = maxAPIRateLimitMinutes + 30; const minUpdateIntervalMinutes = maxAPIRateLimitMinutes + 30;
const maxUpdateIntervalMinutes = 4320; const maxUpdateIntervalMinutes = 43200;
List<int> updateIntervals = [15, 30, 60, 120, 180, 360, 720, 1440, 4320, 0] List<int> updateIntervals = [
15,
30,
60,
120,
180,
360,
720,
1440,
4320,
10080,
20160,
43200,
0
]
.where((element) => .where((element) =>
(element >= minUpdateIntervalMinutes && (element >= minUpdateIntervalMinutes &&
element <= maxUpdateIntervalMinutes) || element <= maxUpdateIntervalMinutes) ||

View File

@@ -70,10 +70,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: background_fetch name: background_fetch
sha256: "34550cf9b383e5a1844e7d22119aa500508c7df9421fa967c9fb4430d6cb2878" sha256: "1a7868d9bd165eb177f039ff8244cfa7952340b18f7caabf322b26e712b438a3"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.2" version: "1.2.3"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
@@ -150,10 +150,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: cross_file name: cross_file
sha256: "2f9d2cbccb76127ba28528cb3ae2c2326a122446a83de5a056aaa3880d3882c5" sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.3.3+7" version: "0.3.4+1"
crypto: crypto:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -206,18 +206,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: dynamic_color name: dynamic_color
sha256: a866f1f8947bfdaf674d7928e769eac7230388a2e7a2542824fad4bb5b87be3b sha256: eae98052fa6e2826bdac3dd2e921c6ce2903be15c6b7f8b6d8a5d49b5086298d
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.6.9" version: "1.7.0"
easy_localization: easy_localization:
dependency: "direct main" dependency: "direct main"
description: description:
name: easy_localization name: easy_localization
sha256: "9c86754b22aaa3e74e471635b25b33729f958dd6fb83df0ad6612948a7b231af" sha256: c145aeb6584aedc7c862ab8c737c3277788f47488bfdf9bae0fe112bd0a4789c
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.4" version: "3.0.5"
easy_logger: easy_logger:
dependency: transitive dependency: transitive
description: description:
@@ -336,10 +336,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_markdown name: flutter_markdown
sha256: "21b085a1c185e46701373866144ced56cfb7a0c33f63c916bb8fe2d0c1491278" sha256: a64c5323ac83ed2b7940d2b6288d160aa1753ff271ba9d9b2a86770414aa3eab
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.19" version: "0.6.20+1"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
@@ -666,10 +666,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: provider name: provider
sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096" sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.1" version: "6.1.2"
share_plus: share_plus:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -730,10 +730,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_web name: shared_preferences_web
sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.1" version: "2.3.0"
shared_preferences_windows: shared_preferences_windows:
dependency: transitive dependency: transitive
description: description:
@@ -855,10 +855,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: url_launcher name: url_launcher
sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.2.4" version: "6.2.5"
url_launcher_android: url_launcher_android:
dependency: transitive dependency: transitive
description: description:
@@ -871,10 +871,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_ios name: url_launcher_ios
sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.2.4" version: "6.2.5"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
@@ -903,10 +903,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_web name: url_launcher_web
sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.0" version: "2.3.0"
url_launcher_windows: url_launcher_windows:
dependency: transitive dependency: transitive
description: description:
@@ -1021,4 +1021,4 @@ packages:
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.3.0 <4.0.0" dart: ">=3.3.0 <4.0.0"
flutter: ">=3.16.6" flutter: ">=3.19.0"

View File

@@ -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 # 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 # 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. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.3+2253 # When changing this, update the tag in main() accordingly version: 1.0.4+2254 # When changing this, update the tag in main() accordingly
environment: environment:
sdk: '>=3.0.0 <4.0.0' sdk: '>=3.0.0 <4.0.0'