Ensure chapter order is retained when passed to source.getMangaUpdate

This commit is contained in:
AntsyLich
2026-06-16 20:00:59 +06:00
parent d156496cfa
commit 5880f4b0bd
@@ -58,6 +58,7 @@ class UpdateMangaFromRemote(
): Result<RemoteMangaUpdate> { ): Result<RemoteMangaUpdate> {
return try { return try {
val chapters = chapterRepository.getChapterByMangaId(manga.id) val chapters = chapterRepository.getChapterByMangaId(manga.id)
.sortedBy { it.sourceOrder }
val update = withIOContext { val update = withIOContext {
source.getMangaUpdate( source.getMangaUpdate(
manga = manga.toSManga(), manga = manga.toSManga(),