Skip to content

Commit

Permalink
Handle install failures more gracefully on apps page (#1782)
Browse files Browse the repository at this point in the history
  • Loading branch information
Imran Remtulla committed Sep 8, 2024
1 parent 61c8859 commit e1bed6f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/providers/apps_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -967,11 +967,16 @@ class AppsProvider with ChangeNotifier {
}
for (var res in downloadResults) {
if (!errors.appIdNames.containsKey(res['id'])) {
await installFn(
res['id'] as String,
res['willBeSilent'] as bool,
res['downloadedFile'] as DownloadedApk?,
res['downloadedDir'] as DownloadedXApkDir?);
try {
await installFn(
res['id'] as String,
res['willBeSilent'] as bool,
res['downloadedFile'] as DownloadedApk?,
res['downloadedDir'] as DownloadedXApkDir?);
} catch (e) {
var id = res['id'] as String;
errors.add(id, e, appName: apps[id]?.name);
}
}
}

Expand Down

0 comments on commit e1bed6f

Please sign in to comment.