Fix tags for suggestions

pull/100/head
Koitharu 4 years ago
parent 3afa782e91
commit 5d26743c8f
No known key found for this signature in database
GPG Key ID: 8E861F8CE6E7CE27

@ -32,7 +32,9 @@ class SuggestionRepository(
db.withTransaction {
db.suggestionDao.deleteAll()
suggestions.forEach { x ->
db.mangaDao.upsert(MangaEntity.from(x.manga))
val tags = x.manga.tags.map(TagEntity.Companion::fromMangaTag)
db.tagsDao.upsert(tags)
db.mangaDao.upsert(MangaEntity.from(x.manga), tags)
db.suggestionDao.upsert(
SuggestionEntity(
mangaId = x.manga.id,

Loading…
Cancel
Save