fix: 修复阅读界面切换亮暗色主题无效的问题
This commit is contained in:
@@ -442,7 +442,7 @@ class ReadSettingsRepository(
|
|||||||
readMenuCustomIcons = this[Keys.ReadMenuCustomIcons] ?: "",
|
readMenuCustomIcons = this[Keys.ReadMenuCustomIcons] ?: "",
|
||||||
titleBarCustomIcons = this[Keys.TitleBarCustomIcons] ?: "",
|
titleBarCustomIcons = this[Keys.TitleBarCustomIcons] ?: "",
|
||||||
titleBarIconPosition = this[Keys.TitleBarIconPosition] ?: 0,
|
titleBarIconPosition = this[Keys.TitleBarIconPosition] ?: 0,
|
||||||
showTitleBarIcons = this[Keys.ShowTitleBarIcons] ?: true,
|
showTitleBarIcons = this[Keys.ShowTitleBarIcons] ?: false,
|
||||||
chineseConverterType = this[Keys.ChineseConverterType] ?: 0,
|
chineseConverterType = this[Keys.ChineseConverterType] ?: 0,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ data class ReadBookUiState(
|
|||||||
@Stable
|
@Stable
|
||||||
data class ReadMenuConfig(
|
data class ReadMenuConfig(
|
||||||
val titleBarIconPosition: Int = 0,
|
val titleBarIconPosition: Int = 0,
|
||||||
val showTitleBarIcons: Boolean = true,
|
val showTitleBarIcons: Boolean = false,
|
||||||
val readMenuFloatingBottomBar: Boolean = false,
|
val readMenuFloatingBottomBar: Boolean = false,
|
||||||
val readMenuBottomCornerRadius: Int = 0,
|
val readMenuBottomCornerRadius: Int = 0,
|
||||||
val readMenuIconItemsPerRow: Int = 5,
|
val readMenuIconItemsPerRow: Int = 5,
|
||||||
|
|||||||
@@ -52,7 +52,9 @@ object ThemeConfig {
|
|||||||
|
|
||||||
var appTheme by prefDelegate(PreferKey.appTheme, "0")
|
var appTheme by prefDelegate(PreferKey.appTheme, "0")
|
||||||
|
|
||||||
var themeMode by prefDelegate(PreferKey.themeMode, "0")
|
var themeMode by prefDelegate(PreferKey.themeMode, "0") {
|
||||||
|
initNightMode()
|
||||||
|
}
|
||||||
|
|
||||||
fun initNightMode() {
|
fun initNightMode() {
|
||||||
when (appCtx.getPrefString(PreferKey.themeMode, "0")) {
|
when (appCtx.getPrefString(PreferKey.themeMode, "0")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user