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 8eadae8ed..d6c89a647 100644 --- a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt +++ b/app/src/main/java/io/legado/app/help/ReadBookConfig.kt @@ -106,9 +106,14 @@ object ReadBookConfig { fun save() { Coroutine.async { synchronized(this) { - val json = GSON.toJson(configList) - FileUtils.deleteFile(configFilePath) - FileUtils.createFileIfNotExist(configFilePath).writeText(json) + GSON.toJson(configList).let { + FileUtils.deleteFile(configFilePath) + FileUtils.createFileIfNotExist(configFilePath).writeText(it) + } + GSON.toJson(shareConfig).let { + FileUtils.deleteFile(shareConfigFilePath) + FileUtils.createFileIfNotExist(shareConfigFilePath).writeText(it) + } } } }