From e8396bd313ab0699eeff8e54bc8bd3d982d4695e Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Wed, 8 Jan 2025 23:18:08 +0800 Subject: [PATCH] opt: checkUpdate Signed-off-by: bggRGjQaUbCoE --- lib/utils/utils.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 36caf058..5cea89ce 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -813,7 +813,11 @@ class Utils { DateTime latest = DateTime.parse(res.data[0]['created_at']); DateTime current = DateTime.parse('${BuildConfig.buildTime}Z'); current = current.copyWith(hour: current.hour - 8); - if (current.compareTo(latest) < 0) { + if (current.compareTo(latest) >= 0) { + if (isAuto.not) { + SmartDialog.showToast('已是最新版本'); + } + } else { SmartDialog.show( animationType: SmartAnimationType.centerFade_otherSlide, builder: (context) {