fix race condition when checking updates

This commit is contained in:
1xFF
2023-07-03 01:27:12 -07:00
parent 09056665c2
commit bcc0d280ab

View File

@@ -902,7 +902,7 @@ class AppsProvider with ChangeNotifier {
if (currentApp.preferredApkIndex < newApp.apkUrls.length) {
newApp.preferredApkIndex = currentApp.preferredApkIndex;
}
await saveApps([newApp]);
if (apps.containsKey(appId)) await saveApps([newApp]);
return newApp.latestVersion != currentApp.latestVersion ? newApp : null;
}