From a37cc036810498d31676d4c948588bae82f29a26 Mon Sep 17 00:00:00 2001 From: Liplum Date: Mon, 27 May 2024 05:48:25 +0800 Subject: [PATCH] [update] randomly delay update popup sheet --- lib/update/utils.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/update/utils.dart b/lib/update/utils.dart index 87e92439b..3e3b1bd6f 100644 --- a/lib/update/utils.dart +++ b/lib/update/utils.dart @@ -79,6 +79,7 @@ Future _checkAppUpdateFromOfficial({ debugPrint(latest.toString()); final currentVersion = R.meta.version; if (latest.downloadOf(R.meta.platform) == null) return; + if(!_isTimeToShow(latest: latest)) return; // if update checking was not manually triggered, skip it. if (!manually && _canSkipVersion(latest: latest.version, current: currentVersion)) return; if (!manually) { @@ -108,6 +109,7 @@ Future _checkAppUpdateFromApple({ } debugPrint(latest.toString()); final currentVersion = R.meta.version; + if(!_isTimeToShow(latest: latest)) return; // if update checking was not manually triggered, skip it. if (!manually && _canSkipVersion(latest: latest.version, current: currentVersion)) return; if (!manually) {