mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
@@ -215,18 +215,15 @@ class MyTheme {
|
||||
}
|
||||
|
||||
static void changeDarkMode(ThemeMode mode) {
|
||||
final preference = getThemeModePreference();
|
||||
if (preference != mode) {
|
||||
Get.changeThemeMode(mode);
|
||||
if (desktopType == DesktopType.main) {
|
||||
if (mode == ThemeMode.system) {
|
||||
bind.mainSetLocalOption(key: kCommConfKeyTheme, value: '');
|
||||
} else {
|
||||
bind.mainSetLocalOption(
|
||||
key: kCommConfKeyTheme, value: mode.toShortString());
|
||||
}
|
||||
Get.changeThemeMode(mode);
|
||||
if (desktopType == DesktopType.main) {
|
||||
bind.mainChangeTheme(dark: currentThemeMode().toShortString());
|
||||
}
|
||||
bind.mainChangeTheme(dark: currentThemeMode().toShortString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user