Fix chapter list live update (#7296)

This commit is contained in:
AntsyLich
2022-06-12 21:23:41 +06:00
committed by GitHub
parent e7695aef78
commit b96686e6ad
8 changed files with 64 additions and 32 deletions
@@ -47,7 +47,7 @@ class HistoryRepositoryImpl(
else -> throw NotImplementedError("Unknown sorting method")
}
val chapters = handler.awaitList { chaptersQueries.getChapterByMangaId(mangaId, chapterMapper) }
val chapters = handler.awaitList { chaptersQueries.getChaptersByMangaId(mangaId, chapterMapper) }
.sortedWith(sortFunction)
val currChapterIndex = chapters.indexOfFirst { chapter.id == it.id }