|
@@ -55,7 +55,6 @@ object ThemeConfig {
|
|
|
initNightMode()
|
|
initNightMode()
|
|
|
BookCover.upDefaultCover()
|
|
BookCover.upDefaultCover()
|
|
|
postEvent(EventBus.RECREATE, "")
|
|
postEvent(EventBus.RECREATE, "")
|
|
|
- postEvent(EventBus.UP_CONFIG, arrayOf(2, 9))
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private fun initNightMode() {
|
|
private fun initNightMode() {
|
|
@@ -74,10 +73,12 @@ object ThemeConfig {
|
|
|
context.getPrefString(PreferKey.bgImage),
|
|
context.getPrefString(PreferKey.bgImage),
|
|
|
context.getPrefInt(PreferKey.bgImageBlurring, 0)
|
|
context.getPrefInt(PreferKey.bgImageBlurring, 0)
|
|
|
)
|
|
)
|
|
|
|
|
+
|
|
|
Theme.Dark -> Pair(
|
|
Theme.Dark -> Pair(
|
|
|
context.getPrefString(PreferKey.bgImageN),
|
|
context.getPrefString(PreferKey.bgImageN),
|
|
|
context.getPrefInt(PreferKey.bgImageNBlurring, 0)
|
|
context.getPrefInt(PreferKey.bgImageNBlurring, 0)
|
|
|
)
|
|
)
|
|
|
|
|
+
|
|
|
else -> null
|
|
else -> null
|
|
|
} ?: return null
|
|
} ?: return null
|
|
|
if (bgCfg.first.isNullOrBlank()) return null
|
|
if (bgCfg.first.isNullOrBlank()) return null
|
|
@@ -218,6 +219,7 @@ object ThemeConfig {
|
|
|
.bottomBackground(Color.WHITE)
|
|
.bottomBackground(Color.WHITE)
|
|
|
.apply()
|
|
.apply()
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
AppConfig.isNightTheme -> {
|
|
AppConfig.isNightTheme -> {
|
|
|
val primary =
|
|
val primary =
|
|
|
getPrefInt(PreferKey.cNPrimary, getCompatColor(R.color.md_blue_grey_600))
|
|
getPrefInt(PreferKey.cNPrimary, getCompatColor(R.color.md_blue_grey_600))
|
|
@@ -238,6 +240,7 @@ object ThemeConfig {
|
|
|
.bottomBackground(ColorUtils.withAlpha(bBackground, 1f))
|
|
.bottomBackground(ColorUtils.withAlpha(bBackground, 1f))
|
|
|
.apply()
|
|
.apply()
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
else -> {
|
|
else -> {
|
|
|
val primary =
|
|
val primary =
|
|
|
getPrefInt(PreferKey.cPrimary, getCompatColor(R.color.md_brown_500))
|
|
getPrefInt(PreferKey.cPrimary, getCompatColor(R.color.md_brown_500))
|