mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-04 15:25:10 +01:00
#105 new: switch of auto check update
This commit is contained in:
@@ -170,6 +170,12 @@ abstract class S {
|
||||
/// **'Auto'**
|
||||
String get auto;
|
||||
|
||||
/// No description provided for @autoCheckUpdate.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Auto check update'**
|
||||
String get autoCheckUpdate;
|
||||
|
||||
/// No description provided for @autoUpdateHomeWidget.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
||||
@@ -40,6 +40,9 @@ class SDe extends S {
|
||||
@override
|
||||
String get auto => 'System folgen';
|
||||
|
||||
@override
|
||||
String get autoCheckUpdate => 'Aktualisierung automatisch prüfen';
|
||||
|
||||
@override
|
||||
String get autoUpdateHomeWidget => 'Home-Widget automatisch aktualisieren';
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ class SEn extends S {
|
||||
@override
|
||||
String get auto => 'Auto';
|
||||
|
||||
@override
|
||||
String get autoCheckUpdate => 'Auto check update';
|
||||
|
||||
@override
|
||||
String get autoUpdateHomeWidget => 'Auto update home widget';
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ class SId extends S {
|
||||
@override
|
||||
String get auto => 'Auto';
|
||||
|
||||
@override
|
||||
String get autoCheckUpdate => 'Periksa pembaruan otomatis';
|
||||
|
||||
@override
|
||||
String get autoUpdateHomeWidget => 'Widget Rumah Pembaruan Otomatis';
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ class SZh extends S {
|
||||
@override
|
||||
String get auto => '自动';
|
||||
|
||||
@override
|
||||
String get autoCheckUpdate => '自动检查更新';
|
||||
|
||||
@override
|
||||
String get autoUpdateHomeWidget => '自动更新桌面小部件';
|
||||
|
||||
@@ -728,6 +731,9 @@ class SZhTw extends SZh {
|
||||
@override
|
||||
String get auto => '自動';
|
||||
|
||||
@override
|
||||
String get autoCheckUpdate => '自動檢查更新';
|
||||
|
||||
@override
|
||||
String get autoUpdateHomeWidget => '自動更新桌面小部件';
|
||||
|
||||
|
||||
@@ -99,4 +99,7 @@ class SettingStore extends PersistentStore {
|
||||
// Only valid on iOS
|
||||
StoreProperty<bool> get autoUpdateHomeWidget =>
|
||||
property('autoUpdateHomeWidget', defaultValue: isIOS);
|
||||
|
||||
StoreProperty<bool> get autoCheckAppUpdate =>
|
||||
property('autoCheckAppUpdate', defaultValue: true);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"alterUrl": "Url ändern",
|
||||
"attention": "Achtung",
|
||||
"auto": "System folgen",
|
||||
"autoCheckUpdate": "Aktualisierung automatisch prüfen",
|
||||
"autoUpdateHomeWidget": "Home-Widget automatisch aktualisieren",
|
||||
"backup": "Backup",
|
||||
"backupAndRestore": "Backup und Wiederherstellung",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"alterUrl": "Alter url",
|
||||
"attention": "Attention",
|
||||
"auto": "Auto",
|
||||
"autoCheckUpdate": "Auto check update",
|
||||
"autoUpdateHomeWidget": "Auto update home widget",
|
||||
"backup": "Backup",
|
||||
"backupAndRestore": "Backup and Restore",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"alterUrl": "Alter url",
|
||||
"attention": "Perhatian",
|
||||
"auto": "Auto",
|
||||
"autoCheckUpdate": "Periksa pembaruan otomatis",
|
||||
"autoUpdateHomeWidget": "Widget Rumah Pembaruan Otomatis",
|
||||
"backup": "Cadangan",
|
||||
"backupAndRestore": "Cadangan dan Pulihkan",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"alterUrl": "备选链接",
|
||||
"attention": "注意",
|
||||
"auto": "自动",
|
||||
"autoCheckUpdate": "自动检查更新",
|
||||
"autoUpdateHomeWidget": "自动更新桌面小部件",
|
||||
"backup": "备份",
|
||||
"backupAndRestore": "备份和恢复",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"alterUrl": "備選鏈接",
|
||||
"attention": "注意",
|
||||
"auto": "自動",
|
||||
"autoCheckUpdate": "自動檢查更新",
|
||||
"autoUpdateHomeWidget": "自動更新桌面小部件",
|
||||
"backup": "備份",
|
||||
"backupAndRestore": "備份和還原",
|
||||
|
||||
@@ -374,7 +374,9 @@ class _FullScreenPageState extends State<FullScreenPage> with AfterLayoutMixin {
|
||||
|
||||
@override
|
||||
Future<void> afterFirstLayout(BuildContext context) async {
|
||||
doUpdate(context);
|
||||
if (_setting.autoCheckAppUpdate.fetch()!) {
|
||||
doUpdate(context);
|
||||
}
|
||||
await GetIt.I.allReady();
|
||||
await _serverProvider.loadLocalData();
|
||||
await _serverProvider.refreshData();
|
||||
|
||||
@@ -330,7 +330,9 @@ class _HomePageState extends State<HomePage>
|
||||
|
||||
@override
|
||||
Future<void> afterFirstLayout(BuildContext context) async {
|
||||
doUpdate(context);
|
||||
if (_setting.autoCheckAppUpdate.fetch()!) {
|
||||
doUpdate(context);
|
||||
}
|
||||
updateHomeWidget();
|
||||
await GetIt.I.allReady();
|
||||
await _serverProvider.loadLocalData();
|
||||
|
||||
@@ -142,6 +142,7 @@ class _SettingPageState extends State<SettingPage> {
|
||||
_buildThemeMode(),
|
||||
_buildAppColor(),
|
||||
_buildLaunchPage(),
|
||||
_buildAutoCheckAppUpdate(),
|
||||
_buildCheckUpdate(),
|
||||
];
|
||||
if (isIOS) {
|
||||
@@ -977,4 +978,12 @@ class _SettingPageState extends State<SettingPage> {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildAutoCheckAppUpdate() {
|
||||
return ListTile(
|
||||
title: Text(_s.autoCheckUpdate),
|
||||
subtitle: Text(_s.whenOpenApp, style: grey),
|
||||
trailing: buildSwitch(context, _setting.autoCheckAppUpdate),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user