From 02fa9841e72e91658e0427706368b0e99c6d5d09 Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Wed, 7 Jul 2021 18:13:04 -0400 Subject: [PATCH] fix chapter source order not working correctly and allow refresh to update source order Co-Authored-By: Carlos <2092019+CarlosEsco@users.noreply.github.com> --- .../eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt index d4266c42e2..e444eb2562 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt @@ -74,6 +74,7 @@ fun syncChaptersWithSource( dbChapter.name = sourceChapter.name dbChapter.date_upload = sourceChapter.date_upload dbChapter.chapter_number = sourceChapter.chapter_number + dbChapter.source_order = sourceChapter.source_order toChange.add(dbChapter) } } @@ -162,8 +163,9 @@ fun syncChaptersWithSource( } // checks if the chapter in db needs updated -private fun shouldUpdateDbChapter(dbChapter: Chapter, sourceChapter: SChapter): Boolean { +private fun shouldUpdateDbChapter(dbChapter: Chapter, sourceChapter: Chapter): Boolean { return dbChapter.scanlator != sourceChapter.scanlator || dbChapter.name != sourceChapter.name || dbChapter.date_upload != sourceChapter.date_upload || - dbChapter.chapter_number != sourceChapter.chapter_number + dbChapter.chapter_number != sourceChapter.chapter_number || + dbChapter.source_order != sourceChapter.source_order }