Skip to content

Commit

Permalink
Fix issue with not showing source names in merged manga sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
jobobby04 committed Oct 14, 2024
1 parent 697b0de commit 2ea8449
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,14 @@ class MangaScreenModel(
screenModelScope.launchIO {
val manga = getMangaAndChapters.awaitManga(mangaId)
// SY -->
val mergedData = getMergedReferencesById.await(mangaId).takeIf { it.isNotEmpty() }?.let { references ->
MergedMangaData(
references,
getMergedMangaById.await(mangaId).associateBy { it.id },
references.map { it.mangaSourceId }.distinct()
.map { sourceManager.getOrStub(it) },
)
}
val chapters = (
if (manga.source ==
MERGED_SOURCE_ID
Expand All @@ -385,15 +393,7 @@ class MangaScreenModel(
getMangaAndChapters.awaitChapters(mangaId, applyScanlatorFilter = true)
}
)
.toChapterListItems(manga, null)
val mergedData = getMergedReferencesById.await(mangaId).takeIf { it.isNotEmpty() }?.let { references ->
MergedMangaData(
references,
getMergedMangaById.await(mangaId).associateBy { it.id },
references.map { it.mangaSourceId }.distinct()
.map { sourceManager.getOrStub(it) },
)
}
.toChapterListItems(manga, mergedData)
val meta = getFlatMetadata.await(mangaId)
// SY <--

Expand Down

0 comments on commit 2ea8449

Please sign in to comment.