opt buildTime

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-18 18:17:36 +08:00
parent 91a1b77d83
commit 768f3e20b1
4 changed files with 13 additions and 16 deletions

View File

@@ -23,10 +23,10 @@ class Update {
}
return;
}
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) {
int latest =
DateTime.parse(res.data[0]['created_at']).millisecondsSinceEpoch ~/
1000;
if (BuildConfig.buildTime >= latest) {
if (!isAuto) {
SmartDialog.showToast('已是最新版本');
}