diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index 26398b7e4..3b026141d 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -118,7 +118,9 @@ void window_on_top(int? id) { windowManager.show(); windowManager.focus(); } else { - WindowController.fromWindowId(id)..focus()..show(); + WindowController.fromWindowId(id) + ..focus() + ..show(); } } diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart index 1d15a30a9..8496b0eda 100644 --- a/flutter/lib/desktop/pages/desktop_home_page.dart +++ b/flutter/lib/desktop/pages/desktop_home_page.dart @@ -479,6 +479,7 @@ class _DesktopHomePageState extends State Get.changeTheme(MyTheme.lightTheme); } Get.find().setString("darkTheme", choice); + Get.forceAppUpdate(); } void onSelectMenu(String key) async { @@ -489,7 +490,7 @@ class _DesktopHomePageState extends State final option = await bind.mainGetOption(key: key); final choice = option == "Y" ? "" : "Y"; bind.mainSetOption(key: key, value: choice); - changeTheme(choice); + if (key == "allow-darktheme") changeTheme(choice); } else if (key == "stop-service") { final option = await bind.mainGetOption(key: key); bind.mainSetOption(key: key, value: option == "Y" ? "" : "Y"); @@ -516,6 +517,8 @@ class _DesktopHomePageState extends State bool enable; if (key == "stop-service") { enable = v != "Y"; + } else if (key.startsWith("allow-")) { + enable = v == "Y"; } else { enable = v != "N"; }