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 bb9a6327e..c431de070 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 @@ -31,6 +31,7 @@ object Backup { "rssStar.json", "replaceRule.json", "txtTocRule.json", + "readRecord.json", ReadBookConfig.readConfigFileName, "config.xml" ) @@ -57,6 +58,7 @@ object Backup { writeListToJson(App.db.rssStarDao().all, "rssStar.json", backupPath) writeListToJson(App.db.replaceRuleDao().all, "replaceRule.json", backupPath) writeListToJson(App.db.txtTocRule().all, "txtTocRule.json", backupPath) + writeListToJson(App.db.readRecordDao().all, "readRecord.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 77cfed255..ca73c6df4 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 @@ -134,6 +134,9 @@ object Restore { fileToListT(path, "txtTocRule.json")?.let { App.db.txtTocRule().insert(*it.toTypedArray()) } + fileToListT(path, "readRecord.json")?.let { + App.db.readRecordDao().insert(*it.toTypedArray()) + } } }