mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-13 18:38:10 +02:00
Merge pull request #647 from 1xFF/fix-remove
fix race condition when checking updates
This commit is contained in:
@@ -785,8 +785,10 @@ class AppsProvider with ChangeNotifier {
|
|||||||
if (attemptToCorrectInstallStatus) {
|
if (attemptToCorrectInstallStatus) {
|
||||||
app = getCorrectedInstallStatusAppIfPossible(app, info) ?? app;
|
app = getCorrectedInstallStatusAppIfPossible(app, info) ?? app;
|
||||||
}
|
}
|
||||||
File('${(await getAppsDir()).path}/${app.id}.json')
|
if (!onlyIfExists || this.apps.containsKey(app.id)) {
|
||||||
.writeAsStringSync(jsonEncode(app.toJson()));
|
File('${(await getAppsDir()).path}/${app.id}.json')
|
||||||
|
.writeAsStringSync(jsonEncode(app.toJson()));
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
this.apps.update(
|
this.apps.update(
|
||||||
app.id, (value) => AppInMemory(app, value.downloadProgress, info),
|
app.id, (value) => AppInMemory(app, value.downloadProgress, info),
|
||||||
|
Reference in New Issue
Block a user