添加源地址订阅功能

pull/517/head
gedoor 4 years ago
parent afb364c960
commit a1e2d59a0a
  1. 2
      app/src/main/java/io/legado/app/help/storage/Backup.kt
  2. 3
      app/src/main/java/io/legado/app/help/storage/Restore.kt

@ -34,6 +34,7 @@ object Backup {
"replaceRule.json",
"readRecord.json",
"searchHistory.json",
"sourceSub.json",
DefaultData.txtTocRuleFileName,
DefaultData.httpTtsFileName,
ReadBookConfig.configFileName,
@ -66,6 +67,7 @@ object Backup {
writeListToJson(App.db.replaceRuleDao().all, "replaceRule.json", backupPath)
writeListToJson(App.db.readRecordDao().all, "readRecord.json", backupPath)
writeListToJson(App.db.searchKeywordDao().all, "searchHistory.json", backupPath)
writeListToJson(App.db.sourceSubDao().all, "sourceSub.json", backupPath)
writeListToJson(App.db.txtTocRule().all, DefaultData.txtTocRuleFileName, backupPath)
writeListToJson(App.db.httpTTSDao().all, DefaultData.httpTtsFileName, backupPath)
GSON.toJson(ReadBookConfig.configList).let {

@ -134,6 +134,9 @@ object Restore {
fileToListT<SearchKeyword>(path, "searchHistory.json")?.let {
App.db.searchKeywordDao().insert(*it.toTypedArray())
}
fileToListT<SourceSub>(path, "sourceSub.json")?.let {
App.db.sourceSubDao().insert(*it.toTypedArray())
}
fileToListT<TxtTocRule>(path, DefaultData.txtTocRuleFileName)?.let {
App.db.txtTocRule().insert(*it.toTypedArray())
}

Loading…
Cancel
Save