Skip to content

Commit

Permalink
[update] randomly delay update popup sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed May 26, 2024
1 parent 90bf207 commit a37cc03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/update/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Future<void> _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) {
Expand Down Expand Up @@ -108,6 +109,7 @@ Future<void> _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) {
Expand Down

0 comments on commit a37cc03

Please sign in to comment.