fix: 修复导入阅读背景配置时颜色值校验错位导致崩溃

This commit is contained in:
HapeLee
2026-06-19 00:20:04 +08:00
parent 2a9153aa63
commit 99e4961bbe
@@ -166,8 +166,8 @@ class ReadStyleRepository(
} }
} }
config.bgStr = bgPath config.bgStr = bgPath
} else if (config.bgTypeNight == 0) { } else if (config.bgType == 0) {
config.bgStrNight.toColorInt() config.bgStr.toColorInt()
} }
if (config.bgTypeNight == 2) { if (config.bgTypeNight == 2) {
val bgName = FileUtils.getName(config.bgStrNight) val bgName = FileUtils.getName(config.bgStrNight)
@@ -180,6 +180,8 @@ class ReadStyleRepository(
} }
} }
config.bgStrNight = bgPath config.bgStrNight = bgPath
} else if (config.bgTypeNight == 0) {
config.bgStrNight.toColorInt()
} }
if (config.bgTypeEInk == 2) { if (config.bgTypeEInk == 2) {
val bgName = FileUtils.getName(config.bgStrEInk) val bgName = FileUtils.getName(config.bgStrEInk)