Tweak library view (#8240)

- Move category join to improve performance
- Move bookmark calculation into query
- Move unread calculation into domain
This commit is contained in:
Andreas
2022-10-18 22:33:26 +02:00
committed by GitHub
parent 2d19729869
commit 8d97b980e3
8 changed files with 56 additions and 43 deletions

View File

@@ -1,20 +0,0 @@
package eu.kanade.domain.chapter.interactor
import eu.kanade.domain.chapter.model.Chapter
import eu.kanade.domain.chapter.repository.ChapterRepository
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
class GetBookmarkedChaptersByMangaId(
private val chapterRepository: ChapterRepository,
) {
suspend fun await(mangaId: Long): List<Chapter> {
return try {
chapterRepository.getBookmarkedChaptersByMangaId(mangaId)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
emptyList()
}
}
}