mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08: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<UserStat> userStat = UserStat().obs;
|
||||||
|
|
||||||
Rx<ThemeType> themeType = ThemeType.system.obs;
|
Rx<ThemeType> themeType = Pref.themeType.obs;
|
||||||
static RxBool anonymity =
|
|
||||||
(Accounts.account.isNotEmpty && !Accounts.heartbeat.isLogin).obs;
|
|
||||||
ThemeType get nextThemeType =>
|
ThemeType get nextThemeType =>
|
||||||
ThemeType.values[(themeType.value.index + 1) % ThemeType.values.length];
|
ThemeType.values[(themeType.value.index + 1) % ThemeType.values.length];
|
||||||
|
|
||||||
|
static RxBool anonymity =
|
||||||
|
(Accounts.account.isNotEmpty && !Accounts.heartbeat.isLogin).obs;
|
||||||
|
|
||||||
late final list =
|
late final list =
|
||||||
<({IconData icon, double size, String title, VoidCallback onTap})>[
|
<({IconData icon, double size, String title, VoidCallback onTap})>[
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -79,13 +79,13 @@ abstract class Pref {
|
|||||||
defaultValue: 0,
|
defaultValue: 0,
|
||||||
)];
|
)];
|
||||||
|
|
||||||
static int get themeTypeInt => _setting.get(
|
static int get _themeTypeInt => _setting.get(
|
||||||
SettingBoxKey.themeMode,
|
SettingBoxKey.themeMode,
|
||||||
defaultValue: ThemeType.system.index,
|
defaultValue: ThemeType.system.index,
|
||||||
);
|
);
|
||||||
|
|
||||||
static ThemeMode get themeMode {
|
static ThemeMode get themeMode {
|
||||||
return switch (themeTypeInt) {
|
return switch (_themeTypeInt) {
|
||||||
0 => ThemeMode.light,
|
0 => ThemeMode.light,
|
||||||
1 => ThemeMode.dark,
|
1 => ThemeMode.dark,
|
||||||
_ => ThemeMode.system,
|
_ => ThemeMode.system,
|
||||||
@@ -142,7 +142,7 @@ abstract class Pref {
|
|||||||
static int get picQuality =>
|
static int get picQuality =>
|
||||||
_setting.get(SettingBoxKey.defaultPicQa, defaultValue: 10);
|
_setting.get(SettingBoxKey.defaultPicQa, defaultValue: 10);
|
||||||
|
|
||||||
static ThemeType get themeType => ThemeType.values[themeTypeInt];
|
static ThemeType get themeType => ThemeType.values[_themeTypeInt];
|
||||||
|
|
||||||
static DynamicBadgeMode get dynamicBadgeType =>
|
static DynamicBadgeMode get dynamicBadgeType =>
|
||||||
DynamicBadgeMode.values[_setting.get(
|
DynamicBadgeMode.values[_setting.get(
|
||||||
|
|||||||
Reference in New Issue
Block a user