Fixed the issue where the update dialog was not showed on startup.

This commit is contained in:
2025-06-18 16:07:36 +08:00
parent cc08445f13
commit a46ceebf19
2 changed files with 5 additions and 3 deletions

View File

@@ -96,10 +96,13 @@ Future<bool> checkUpdate() async {
return false;
}
Future<void> checkUpdateUi([bool showMessageIfNoUpdate = true]) async {
Future<void> checkUpdateUi([bool showMessageIfNoUpdate = true, bool delay = false]) async {
try {
var value = await checkUpdate();
if (value) {
if (delay) {
await Future.delayed(const Duration(seconds: 2));
}
showDialog(
context: App.rootContext,
builder: (context) {