Made download start more responsive (#361, #327)

This commit is contained in:
Imran Remtulla
2023-03-17 16:48:06 -04:00
parent a0199f0ceb
commit c0120f4e40

View File

@@ -145,6 +145,10 @@ class AppsProvider with ChangeNotifier {
}
Future<DownloadedApk> downloadApp(App app, BuildContext? context) async {
if (apps[app.id] != null) {
apps[app.id]!.downloadProgress = 0;
notifyListeners();
}
var fileName =
'${app.id}-${app.latestVersion}-${app.preferredApkIndex}.apk';
String downloadUrl = await SourceProvider()