From 8a083f40b0a560f18d673751c1ac54cd428aef25 Mon Sep 17 00:00:00 2001 From: csf Date: Mon, 6 Mar 2023 23:37:43 +0900 Subject: [PATCH] fix mobile change theme failure --- flutter/lib/common.dart | 2 +- src/lang/cn.rs | 2 +- src/lang/tw.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index dc91e9414..3d6f62efc 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -375,7 +375,7 @@ class MyTheme { static void changeDarkMode(ThemeMode mode) async { Get.changeThemeMode(mode); - if (desktopType == DesktopType.main) { + if (desktopType == DesktopType.main || isAndroid || isIOS) { if (mode == ThemeMode.system) { await bind.mainSetLocalOption(key: kCommConfKeyTheme, value: ''); } else { diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 3f4f6d25c..b5f71e588 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -349,7 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "安全"), ("Theme", "主题"), ("Dark Theme", "暗黑主题"), - ("Light Theme", ""), + ("Light Theme", "明亮主题"), ("Dark", "黑暗"), ("Light", "明亮"), ("Follow System", "跟随系统"), diff --git a/src/lang/tw.rs b/src/lang/tw.rs index d0f12cdfa..3fb2297e3 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -349,7 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "安全"), ("Theme", "主題"), ("Dark Theme", "暗黑主題"), - ("Light Theme", ""), + ("Light Theme", "明亮主題"), ("Dark", "黑暗"), ("Light", "明亮"), ("Follow System", "跟隨系統"),