This commit is contained in:
Developer
2026-03-31 23:31:38 +08:00
parent b081f09895
commit 2f785d6279
11 changed files with 549 additions and 94 deletions

View File

@@ -561,12 +561,19 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
TextButton(
onPressed: () async {
Navigator.of(context).pop();
await _setAutoRefresh(false);
await _setDebugInfo(false);
// 重置所有设置为默认值
await _setAutoRefresh(false); // 自动刷新:关闭
await _setDebugInfo(false); // 调试信息:关闭
await _setPreload(true); // 预加载:开启
await _setHideSecondaryButtons(false); // 隐藏次要按钮:关闭
await _setSoundEnabled(false); // 声音反馈:关闭
// 全局Tips开启
final prefs = await SharedPreferences.getInstance();
await prefs.setBool(_globalTipsKey, true);
// 震动反馈开启不需要保存到SharedPreferences直接更新状态
setState(() {
_soundEnabled = true;
_vibrationEnabled = true;
_globalTipsEnabled = true; // 重置全局Tips开关为开启
_globalTipsEnabled = true; // 全局Tips开启
});
_showSnackBar('已恢复默认设置');
},
@@ -577,3 +584,10 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
);
}
}
// - 自动刷新:关闭
// - 调试信息:关闭
// - 预加载:开启
// - 隐藏次要按钮:关闭
// - 声音反馈:关闭
// - 震动反馈:开启
// - Tips