Ensure all fields in new migrated manga are persisted (fixes #5848)

This commit is contained in:
arkon 2021-09-04 19:05:43 -04:00
parent 6b1f130750
commit 12a593c3c6

View File

@ -149,13 +149,10 @@ class SearchPresenter(
db.updateMangaFavorite(prevManga).executeAsBlocking() db.updateMangaFavorite(prevManga).executeAsBlocking()
} }
manga.favorite = true manga.favorite = true
db.updateMangaFavorite(manga).executeAsBlocking()
// Update reading preferences // Update reading preferences
manga.chapter_flags = prevManga.chapter_flags manga.chapter_flags = prevManga.chapter_flags
db.updateChapterFlags(manga).executeAsBlocking()
manga.viewer_flags = prevManga.viewer_flags manga.viewer_flags = prevManga.viewer_flags
db.updateViewerFlags(manga).executeAsBlocking()
// Update date added // Update date added
if (replace) { if (replace) {
@ -165,8 +162,9 @@ class SearchPresenter(
manga.date_added = Date().time manga.date_added = Date().time
} }
// SearchPresenter#networkToLocalManga may have updated the manga title, so ensure db gets updated title // SearchPresenter#networkToLocalManga may have updated the manga title,
db.updateMangaTitle(manga).executeAsBlocking() // so ensure db gets updated title too
db.insertManga(manga).executeAsBlocking()
} }
} }
} }