|
|
@ -28,9 +28,9 @@ object ReadBookConfig { |
|
|
|
GSON.fromJsonArray<Config>(json)!! |
|
|
|
GSON.fromJsonArray<Config>(json)!! |
|
|
|
} |
|
|
|
} |
|
|
|
var durConfig |
|
|
|
var durConfig |
|
|
|
get() = getConfig(styleSelect) |
|
|
|
get() = getConfig(styleSelect + 1) |
|
|
|
set(value) { |
|
|
|
set(value) { |
|
|
|
configList[styleSelect] = value |
|
|
|
configList[styleSelect + 1] = value |
|
|
|
if (shareLayout) { |
|
|
|
if (shareLayout) { |
|
|
|
configList[5] = value |
|
|
|
configList[5] = value |
|
|
|
} |
|
|
|
} |
|
|
@ -51,7 +51,7 @@ object ReadBookConfig { |
|
|
|
resetAll() |
|
|
|
resetAll() |
|
|
|
} |
|
|
|
} |
|
|
|
if (configList.size < 6) { |
|
|
|
if (configList.size < 6) { |
|
|
|
configList.add(Config()) |
|
|
|
configList.add(0, Config()) |
|
|
|
} |
|
|
|
} |
|
|
|
return configList[index] |
|
|
|
return configList[index] |
|
|
|
} |
|
|
|
} |
|
|
@ -160,7 +160,7 @@ object ReadBookConfig { |
|
|
|
var hideStatusBar = App.INSTANCE.getPrefBoolean(PreferKey.hideStatusBar) |
|
|
|
var hideStatusBar = App.INSTANCE.getPrefBoolean(PreferKey.hideStatusBar) |
|
|
|
var hideNavigationBar = App.INSTANCE.getPrefBoolean(PreferKey.hideNavigationBar) |
|
|
|
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 |
|
|
|
var textFont: String |
|
|
|
get() = config.textFont |
|
|
|
get() = config.textFont |
|
|
@ -308,7 +308,7 @@ object ReadBookConfig { |
|
|
|
fun getExportConfig(): Config { |
|
|
|
fun getExportConfig(): Config { |
|
|
|
val exportConfig = GSON.fromJsonObject<Config>(GSON.toJson(durConfig))!! |
|
|
|
val exportConfig = GSON.fromJsonObject<Config>(GSON.toJson(durConfig))!! |
|
|
|
if (shareLayout) { |
|
|
|
if (shareLayout) { |
|
|
|
val shearConfig = getConfig(5) |
|
|
|
val shearConfig = getConfig(0) |
|
|
|
exportConfig.textFont = shearConfig.textFont |
|
|
|
exportConfig.textFont = shearConfig.textFont |
|
|
|
exportConfig.textBold = shearConfig.textBold |
|
|
|
exportConfig.textBold = shearConfig.textBold |
|
|
|
exportConfig.textSize = shearConfig.textSize |
|
|
|
exportConfig.textSize = shearConfig.textSize |
|
|
|