From 7bd41b0d1cc25db292b2102139e125d9ee19aa19 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 23 Aug 2020 16:19:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E9=98=85=E8=AF=BB=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/storage/Backup.kt | 2 ++ app/src/main/java/io/legado/app/help/storage/Restore.kt | 3 +++ 2 files changed, 5 insertions(+) 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()) + } } }