diff --git a/app/src/main/assets/readConfig.json b/app/src/main/assets/readConfig.json index 968141a0c..c94ecda3b 100644 --- a/app/src/main/assets/readConfig.json +++ b/app/src/main/assets/readConfig.json @@ -1,4 +1,14 @@ [ + { + "bgStr": "#FFFFFF", + "bgStrNight": "#000000", + "textColor": "#000000", + "textColorNight": "#FFFFFF", + "bgType": 0, + "bgTypeNight": 0, + "darkStatusIcon": true, + "darkStatusIconNight": false + }, { "bgStr": "#FFFFFF", "bgStrNight": "#000000", diff --git a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt b/app/src/main/java/io/legado/app/help/ReadBookConfig.kt index 9d249fe2a..0472bed7c 100644 --- a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt +++ b/app/src/main/java/io/legado/app/help/ReadBookConfig.kt @@ -28,9 +28,9 @@ object ReadBookConfig { GSON.fromJsonArray(json)!! } var durConfig - get() = getConfig(styleSelect) + get() = getConfig(styleSelect + 1) set(value) { - configList[styleSelect] = value + configList[styleSelect + 1] = value if (shareLayout) { configList[5] = value } @@ -51,7 +51,7 @@ object ReadBookConfig { resetAll() } if (configList.size < 6) { - configList.add(Config()) + configList.add(0, Config()) } return configList[index] } @@ -160,7 +160,7 @@ object ReadBookConfig { var hideStatusBar = App.INSTANCE.getPrefBoolean(PreferKey.hideStatusBar) var hideNavigationBar = App.INSTANCE.getPrefBoolean(PreferKey.hideNavigationBar) - val config get() = if (shareLayout) getConfig(5) else durConfig + val config get() = if (shareLayout) getConfig(0) else durConfig var textFont: String get() = config.textFont @@ -308,7 +308,7 @@ object ReadBookConfig { fun getExportConfig(): Config { val exportConfig = GSON.fromJsonObject(GSON.toJson(durConfig))!! if (shareLayout) { - val shearConfig = getConfig(5) + val shearConfig = getConfig(0) exportConfig.textFont = shearConfig.textFont exportConfig.textBold = shearConfig.textBold exportConfig.textSize = shearConfig.textSize