Fix backup restore
This commit is contained in:
@@ -25,8 +25,8 @@ class RestoreRepository(private val db: MangaDatabase) {
|
|||||||
val history = parseHistory(item)
|
val history = parseHistory(item)
|
||||||
result += runCatching {
|
result += runCatching {
|
||||||
db.withTransaction {
|
db.withTransaction {
|
||||||
db.mangaDao.upsert(manga, tags)
|
|
||||||
db.tagsDao.upsert(tags)
|
db.tagsDao.upsert(tags)
|
||||||
|
db.mangaDao.upsert(manga, tags)
|
||||||
db.historyDao.upsert(history)
|
db.historyDao.upsert(history)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,8 +56,8 @@ class RestoreRepository(private val db: MangaDatabase) {
|
|||||||
val favourite = parseFavourite(item)
|
val favourite = parseFavourite(item)
|
||||||
result += runCatching {
|
result += runCatching {
|
||||||
db.withTransaction {
|
db.withTransaction {
|
||||||
db.mangaDao.upsert(manga, tags)
|
|
||||||
db.tagsDao.upsert(tags)
|
db.tagsDao.upsert(tags)
|
||||||
|
db.mangaDao.upsert(manga, tags)
|
||||||
db.favouritesDao.upsert(favourite)
|
db.favouritesDao.upsert(favourite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<paths>
|
<paths>
|
||||||
<external-files-path
|
<external-files-path
|
||||||
name="manga"
|
name="manga-ext"
|
||||||
path="/manga" />
|
path="/manga" />
|
||||||
<external-files-path
|
<external-files-path
|
||||||
|
name="backups-ext"
|
||||||
|
path="/backups" />
|
||||||
|
<files-path
|
||||||
name="backups"
|
name="backups"
|
||||||
path="/backups" />
|
path="/backups" />
|
||||||
</paths>
|
</paths>
|
||||||
Reference in New Issue
Block a user