Fix backup restore

This commit is contained in:
Koitharu
2021-01-10 11:13:39 +02:00
parent 1a0986212b
commit a242aa6633
2 changed files with 6 additions and 3 deletions

View File

@@ -25,8 +25,8 @@ class RestoreRepository(private val db: MangaDatabase) {
val history = parseHistory(item)
result += runCatching {
db.withTransaction {
db.mangaDao.upsert(manga, tags)
db.tagsDao.upsert(tags)
db.mangaDao.upsert(manga, tags)
db.historyDao.upsert(history)
}
}
@@ -56,8 +56,8 @@ class RestoreRepository(private val db: MangaDatabase) {
val favourite = parseFavourite(item)
result += runCatching {
db.withTransaction {
db.mangaDao.upsert(manga, tags)
db.tagsDao.upsert(tags)
db.mangaDao.upsert(manga, tags)
db.favouritesDao.upsert(favourite)
}
}

View File

@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-files-path
name="manga"
name="manga-ext"
path="/manga" />
<external-files-path
name="backups-ext"
path="/backups" />
<files-path
name="backups"
path="/backups" />
</paths>