opt. & fix.

fix: setting page update item display issue.
fix: `bgRun` condition issue.
opt: `r_upgrade` use 0.3.8+2
This commit is contained in:
lollipopkit
2023-04-04 17:38:00 +08:00
parent 0ac6984576
commit 19baff5dde
5 changed files with 18 additions and 14 deletions

View File

@@ -27,8 +27,6 @@ Future<bool> isFileAvailable(String url) async {
Future<void> doUpdate(BuildContext context, {bool force = false}) async {
final update = await locator<AppService>().getUpdate();
locator<AppProvider>().setNewestBuild(update.newest);
final newest = () {
if (isAndroid) {
return update.androidbuild;
@@ -40,6 +38,8 @@ Future<void> doUpdate(BuildContext context, {bool force = false}) async {
return update.newest;
}();
locator<AppProvider>().setNewestBuild(newest);
if (!force && newest <= BuildData.build) {
_logger.info('Update ignored due to current: ${BuildData.build}, '
'update: $newest');