Fix chapters in delegated manga where you haven't filtered any groups

This commit is contained in:
Jobobby04 2020-10-26 13:07:55 -04:00
parent eb3a987826
commit 35217036ce

View File

@ -116,7 +116,7 @@ class ReaderPresenter(
val manga = manga!! val manga = manga!!
// SY --> // SY -->
val meta = meta val meta = meta
val filteredScanlators = MdUtil.getScanlators(meta?.filteredScanlators.orEmpty()) val filteredScanlators = meta?.filteredScanlators?.let { MdUtil.getScanlators(it) }
// SY <-- // SY <--
val dbChapters = /* SY --> */if (manga.source == MERGED_SOURCE_ID) runBlocking { (sourceManager.get(MERGED_SOURCE_ID) as? MergedSource)?.getChaptersFromDB(manga)?.awaitSingleOrNull() ?: emptyList() } else /* SY <-- */ db.getChapters(manga).executeAsBlocking() val dbChapters = /* SY --> */if (manga.source == MERGED_SOURCE_ID) runBlocking { (sourceManager.get(MERGED_SOURCE_ID) as? MergedSource)?.getChaptersFromDB(manga)?.awaitSingleOrNull() ?: emptyList() } else /* SY <-- */ db.getChapters(manga).executeAsBlocking()
@ -139,7 +139,7 @@ class ReaderPresenter(
) || ) ||
(manga.bookmarkedFilter == Manga.SHOW_BOOKMARKED && !it.bookmark) || (manga.bookmarkedFilter == Manga.SHOW_BOOKMARKED && !it.bookmark) ||
// SY --> // SY -->
(meta != null && it.scanlatorList().none { group -> filteredScanlators.contains(group) }) (filteredScanlators != null && it.scanlatorList().none { group -> filteredScanlators.contains(group) })
// SY <-- // SY <--
) { ) {
return@filter false return@filter false