在线朗读改为自定义

pull/332/head
gedoor 4 years ago
parent d9c0dccc2a
commit 9215bcf29f
  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

@ -32,6 +32,7 @@ object Backup {
"replaceRule.json",
"txtTocRule.json",
"readRecord.json",
"httpTTS.json",
ReadBookConfig.readConfigFileName,
"config.xml"
)
@ -59,6 +60,7 @@ object Backup {
writeListToJson(App.db.replaceRuleDao().all, "replaceRule.json", backupPath)
writeListToJson(App.db.txtTocRule().all, "txtTocRule.json", backupPath)
writeListToJson(App.db.readRecordDao().all, "readRecord.json", backupPath)
writeListToJson(App.db.httpTTSDao().all, "httpTTS.json", backupPath)
GSON.toJson(ReadBookConfig.configList)?.let {
FileUtils.createFileIfNotExist(backupPath + File.separator + ReadBookConfig.readConfigFileName)
.writeText(it)

@ -137,6 +137,9 @@ object Restore {
fileToListT<ReadRecord>(path, "readRecord.json")?.let {
App.db.readRecordDao().insert(*it.toTypedArray())
}
fileToListT<HttpTTS>(path, "httpTTS.json")?.let {
App.db.httpTTSDao().insert(*it.toTypedArray())
}
}
}

Loading…
Cancel
Save