Add "Check for updates on startup" setting. #129

This commit is contained in:
2025-01-06 22:38:05 +08:00
parent 4b19ab57d2
commit 9876da85da
2 changed files with 11 additions and 3 deletions

View File

@@ -264,7 +264,8 @@
"Enable": "启用",
"Aggregated": "聚合",
"Default Search Target": "默认搜索目标",
"Auto Language Filters": "自动语言筛选"
"Auto Language Filters": "自动语言筛选",
"Check for updates on startup": "启动时检查更新"
},
"zh_TW": {
"Home": "首頁",
@@ -531,6 +532,7 @@
"Enable": "啟用",
"Aggregated": "聚合",
"Default Search Target": "默認搜索目標",
"Auto Language Filters": "自動語言篩選"
"Auto Language Filters": "自動語言篩選",
"Check for updates on startup": "啟動時檢查更新"
}
}

View File

@@ -61,6 +61,10 @@ class _AboutSettingsState extends State<AboutSettings> {
},
).fixHeight(32),
).toSliver(),
_SwitchSetting(
title: "Check for updates on startup".tl,
settingKey: "checkUpdateOnStart",
).toSliver(),
ListTile(
title: const Text("Github"),
trailing: const Icon(Icons.open_in_new),
@@ -102,7 +106,9 @@ Future<void> checkUpdateUi([bool showMessageIfNoUpdate = true]) async {
return ContentDialog(
title: "New version available".tl,
content: Text(
"A new version is available. Do you want to update now?".tl),
"A new version is available. Do you want to update now?"
.tl)
.paddingHorizontal(8),
actions: [
Button.text(
onPressed: () {