mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-26 03:03:45 +01:00
Add "refresh before download" + remove WhatsApp (#1943)
This commit is contained in:
@@ -888,6 +888,11 @@ class AppsProvider with ChangeNotifier {
|
||||
}
|
||||
MapEntry<String, String>? apkUrl;
|
||||
var trackOnly = apps[id]!.app.additionalSettings['trackOnly'] == true;
|
||||
var refreshBeforeDownload =
|
||||
apps[id]!.app.additionalSettings['refreshBeforeDownload'] == true;
|
||||
if (refreshBeforeDownload) {
|
||||
await checkUpdate(apps[id]!.app.id);
|
||||
}
|
||||
if (!trackOnly) {
|
||||
// ignore: use_build_context_synchronously
|
||||
apkUrl = await confirmAppFileUrl(apps[id]!.app, context, false);
|
||||
@@ -1074,6 +1079,11 @@ class AppsProvider with ChangeNotifier {
|
||||
throw ObtainiumError(tr('appNotFound'));
|
||||
}
|
||||
MapEntry<String, String>? fileUrl;
|
||||
var refreshBeforeDownload =
|
||||
apps[id]!.app.additionalSettings['refreshBeforeDownload'] == true;
|
||||
if (refreshBeforeDownload) {
|
||||
await checkUpdate(apps[id]!.app.id);
|
||||
}
|
||||
if (apps[id]!.app.apkUrls.isNotEmpty ||
|
||||
apps[id]!.app.otherAssetUrls.isNotEmpty) {
|
||||
// ignore: use_build_context_synchronously
|
||||
|
||||
Reference in New Issue
Block a user