背景配置自由添加

pull/371/head
gedoor 4 years ago
parent dd83e98d08
commit d9ce88b841
  1. 11
      app/src/main/java/io/legado/app/help/ReadBookConfig.kt

@ -106,9 +106,14 @@ object ReadBookConfig {
fun save() { fun save() {
Coroutine.async { Coroutine.async {
synchronized(this) { synchronized(this) {
val json = GSON.toJson(configList) GSON.toJson(configList).let {
FileUtils.deleteFile(configFilePath) FileUtils.deleteFile(configFilePath)
FileUtils.createFileIfNotExist(configFilePath).writeText(json) FileUtils.createFileIfNotExist(configFilePath).writeText(it)
}
GSON.toJson(shareConfig).let {
FileUtils.deleteFile(shareConfigFilePath)
FileUtils.createFileIfNotExist(shareConfigFilePath).writeText(it)
}
} }
} }
} }

Loading…
Cancel
Save