mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-27 03:28:40 +00:00
fix theme type
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -30,12 +30,14 @@ class MineController
|
||||
// 用户状态 动态、关注、粉丝
|
||||
Rx<UserStat> userStat = UserStat().obs;
|
||||
|
||||
Rx<ThemeType> themeType = ThemeType.system.obs;
|
||||
static RxBool anonymity =
|
||||
(Accounts.account.isNotEmpty && !Accounts.heartbeat.isLogin).obs;
|
||||
Rx<ThemeType> themeType = Pref.themeType.obs;
|
||||
|
||||
ThemeType get nextThemeType =>
|
||||
ThemeType.values[(themeType.value.index + 1) % ThemeType.values.length];
|
||||
|
||||
static RxBool anonymity =
|
||||
(Accounts.account.isNotEmpty && !Accounts.heartbeat.isLogin).obs;
|
||||
|
||||
late final list =
|
||||
<({IconData icon, double size, String title, VoidCallback onTap})>[
|
||||
(
|
||||
|
||||
@@ -79,13 +79,13 @@ abstract class Pref {
|
||||
defaultValue: 0,
|
||||
)];
|
||||
|
||||
static int get themeTypeInt => _setting.get(
|
||||
static int get _themeTypeInt => _setting.get(
|
||||
SettingBoxKey.themeMode,
|
||||
defaultValue: ThemeType.system.index,
|
||||
);
|
||||
|
||||
static ThemeMode get themeMode {
|
||||
return switch (themeTypeInt) {
|
||||
return switch (_themeTypeInt) {
|
||||
0 => ThemeMode.light,
|
||||
1 => ThemeMode.dark,
|
||||
_ => ThemeMode.system,
|
||||
@@ -142,7 +142,7 @@ abstract class Pref {
|
||||
static int get picQuality =>
|
||||
_setting.get(SettingBoxKey.defaultPicQa, defaultValue: 10);
|
||||
|
||||
static ThemeType get themeType => ThemeType.values[themeTypeInt];
|
||||
static ThemeType get themeType => ThemeType.values[_themeTypeInt];
|
||||
|
||||
static DynamicBadgeMode get dynamicBadgeType =>
|
||||
DynamicBadgeMode.values[_setting.get(
|
||||
|
||||
Reference in New Issue
Block a user