Bugfix for prev. commit

This commit is contained in:
Imran Remtulla
2023-04-30 00:15:53 -04:00
parent 81f66683d2
commit 04b3c8ad7d
3 changed files with 28 additions and 28 deletions

View File

@@ -351,7 +351,8 @@ class AppsProvider with ChangeNotifier {
// If user input is needed and the App is in the background, a notification is sent to get the user's attention
// Returns an array of Ids for Apps that were successfully downloaded, regardless of installation result
Future<List<String>> downloadAndInstallLatestApps(
List<String> appIds, BuildContext? context) async {
List<String> appIds, BuildContext? context,
{SettingsProvider? settingsProvider}) async {
List<String> appsToInstall = [];
List<String> trackOnlyAppsToUpdate = [];
// For all specified Apps, filter out those for which:
@@ -440,6 +441,11 @@ class AppsProvider with ChangeNotifier {
silentUpdates = moveObtainiumToStart(silentUpdates);
regularInstalls = moveObtainiumToStart(regularInstalls);
if (!(await settingsProvider?.getInstallPermission(enforce: false) ??
true)) {
throw ObtainiumError(tr('cancelled'));
}
// // Install silent updates (uncomment when it works - TODO)
// for (var u in silentUpdates) {
// await installApk(u, silent: true); // Would need to add silent option