|
|
@ -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) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|