DownloadProvider: Only provide necessary info and not whole chapter/manga class (#7411)

This commit is contained in:
AntsyLich
2022-06-30 19:20:55 +06:00
committed by GitHub
parent 388dc2f103
commit e1525a5125
10 changed files with 83 additions and 61 deletions
@@ -435,7 +435,7 @@ class MangaPresenter(
private fun List<DomainChapter>.toChapterItems(manga: DomainManga): List<ChapterItem> {
return map { chapter ->
val activeDownload = downloadManager.queue.find { chapter.id == it.chapter.id }
val downloaded = downloadManager.isChapterDownloaded(chapter.toDbChapter(), manga.toDbManga())
val downloaded = downloadManager.isChapterDownloaded(chapter.name, chapter.scanlator, manga.title, manga.source)
val downloadState = when {
activeDownload != null -> activeDownload.status
downloaded -> Download.State.DOWNLOADED