diff --git a/app/src/main/java/io/legado/app/help/storage/Backup.kt b/app/src/main/java/io/legado/app/help/storage/Backup.kt index 0e11042d2..03ea7a84b 100644 --- a/app/src/main/java/io/legado/app/help/storage/Backup.kt +++ b/app/src/main/java/io/legado/app/help/storage/Backup.kt @@ -30,6 +30,7 @@ object Backup { "rssSource.json", "rssStar.json", "replaceRule.json", + "txtTocRule.json", ReadBookConfig.readConfigFileName, "config.xml" ) @@ -55,6 +56,7 @@ object Backup { writeListToJson(App.db.rssSourceDao().all, "rssSource.json", backupPath) writeListToJson(App.db.rssStarDao().all, "rssStar.json", backupPath) writeListToJson(App.db.replaceRuleDao().all, "replaceRule.json", backupPath) + writeListToJson(App.db.txtTocRule().all, "txtTocRule.json", backupPath) GSON.toJson(ReadBookConfig.configList)?.let { FileUtils.createFileIfNotExist(backupPath + File.separator + ReadBookConfig.readConfigFileName) .writeText(it) diff --git a/app/src/main/java/io/legado/app/help/storage/Restore.kt b/app/src/main/java/io/legado/app/help/storage/Restore.kt index c2c527ddd..1b5b1603d 100644 --- a/app/src/main/java/io/legado/app/help/storage/Restore.kt +++ b/app/src/main/java/io/legado/app/help/storage/Restore.kt @@ -131,6 +131,9 @@ object Restore { fileToListT(path, "replaceRule.json")?.let { App.db.replaceRuleDao().insert(*it.toTypedArray()) } + fileToListT(path, "txtTocRule.json")?.let { + App.db.txtTocRule().insert(*it.toTypedArray()) + } } }