fix theme sync
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
8646733ae7
commit
fb0c75f188
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user