Fix crash (maybe) when sending app to BG while reading

This commit is contained in:
Jays2Kings 2023-10-07 13:07:34 -07:00
parent 2f1457954c
commit 8f7a45e967

View file

@ -588,8 +588,10 @@ class ReaderViewModel(
* Called when reader chapter is changed in reader or when activity is paused.
*/
private fun saveReadingProgress(readerChapter: ReaderChapter) {
saveChapterProgress(readerChapter)
saveChapterHistory(readerChapter)
db.inTransaction {
saveChapterProgress(readerChapter)
saveChapterHistory(readerChapter)
}
}
fun saveCurrentChapterReadingProgress() = getCurrentChapter()?.let { saveReadingProgress(it) }