Fixed update checking on App page

This commit is contained in:
Imran Remtulla
2022-09-29 23:20:57 -04:00
parent fbe4f0b49e
commit 0a560871cb
3 changed files with 8 additions and 3 deletions

View File

@@ -293,6 +293,11 @@ class AppsProvider with ChangeNotifier {
}
await saveApps([newApp]);
return newApp;
} else if ((newApp.lastUpdateCheck?.microsecondsSinceEpoch ?? 0) -
(currentApp.lastUpdateCheck?.microsecondsSinceEpoch ?? 0) >
5000000) {
currentApp.lastUpdateCheck = newApp.lastUpdateCheck;
await saveApps([currentApp]);
}
return null;
}
@@ -306,7 +311,7 @@ class AppsProvider with ChangeNotifier {
if (ignoreAfter != null) {
appIds = appIds
.where((id) =>
apps[id]!.app.lastUpdateCheck != null &&
apps[id]!.app.lastUpdateCheck == null ||
apps[id]!.app.lastUpdateCheck!.isBefore(ignoreAfter))
.toList();
}