Add tests for MissingChapters function

This commit is contained in:
arkon
2023-04-15 09:51:52 -04:00
parent 4bcd623829
commit 8ab7e63293
8 changed files with 51 additions and 25 deletions
@@ -65,7 +65,7 @@ import eu.kanade.tachiyomi.ui.manga.chapterDecimalFormat
import eu.kanade.tachiyomi.util.lang.toRelativeString
import eu.kanade.tachiyomi.util.system.copyToClipboard
import tachiyomi.domain.chapter.model.Chapter
import tachiyomi.domain.chapter.service.countMissingChapters
import tachiyomi.domain.chapter.service.missingChaptersCount
import tachiyomi.domain.manga.model.Manga
import tachiyomi.domain.source.model.StubSource
import tachiyomi.presentation.core.components.LazyColumn
@@ -394,7 +394,7 @@ private fun MangaScreenSmallImpl(
ChapterHeader(
enabled = chapters.fastAll { !it.selected },
chapterCount = chapters.size,
missingChapterCount = countMissingChapters(chapters.map { it.chapter.chapterNumber }),
missingChapterCount = chapters.map { it.chapter.chapterNumber }.missingChaptersCount(),
onClick = onFilterClicked,
)
}
@@ -606,7 +606,7 @@ fun MangaScreenLargeImpl(
ChapterHeader(
enabled = chapters.fastAll { !it.selected },
chapterCount = chapters.size,
missingChapterCount = countMissingChapters(chapters.map { it.chapter.chapterNumber }),
missingChapterCount = chapters.map { it.chapter.chapterNumber }.missingChaptersCount(),
onClick = onFilterButtonClicked,
)
}