fix: 修复阅读界面切换亮暗色主题无效的问题

This commit is contained in:
HapeLee
2026-06-08 13:51:12 +08:00
parent 9189b3dcfc
commit e5c6643da8
3 changed files with 5 additions and 3 deletions
@@ -442,7 +442,7 @@ class ReadSettingsRepository(
readMenuCustomIcons = this[Keys.ReadMenuCustomIcons] ?: "",
titleBarCustomIcons = this[Keys.TitleBarCustomIcons] ?: "",
titleBarIconPosition = this[Keys.TitleBarIconPosition] ?: 0,
showTitleBarIcons = this[Keys.ShowTitleBarIcons] ?: true,
showTitleBarIcons = this[Keys.ShowTitleBarIcons] ?: false,
chineseConverterType = this[Keys.ChineseConverterType] ?: 0,
)
}
@@ -159,7 +159,7 @@ data class ReadBookUiState(
@Stable
data class ReadMenuConfig(
val titleBarIconPosition: Int = 0,
val showTitleBarIcons: Boolean = true,
val showTitleBarIcons: Boolean = false,
val readMenuFloatingBottomBar: Boolean = false,
val readMenuBottomCornerRadius: Int = 0,
val readMenuIconItemsPerRow: Int = 5,
@@ -52,7 +52,9 @@ object ThemeConfig {
var appTheme by prefDelegate(PreferKey.appTheme, "0")
var themeMode by prefDelegate(PreferKey.themeMode, "0")
var themeMode by prefDelegate(PreferKey.themeMode, "0") {
initNightMode()
}
fun initNightMode() {
when (appCtx.getPrefString(PreferKey.themeMode, "0")) {