Fix library ETA compile by adding history interactor
Some checks failed
Forgejo Release Builder / release (push) Failing after 8m38s

This commit is contained in:
littlecodedragon 2026-05-07 06:08:52 +02:00
parent fe3e366181
commit 780ef2af25
2 changed files with 15 additions and 2 deletions

View file

@ -194,8 +194,7 @@ class LibraryScreenModel(
),
// KMK <--
getLibraryItemPreferencesFlow(),
getTotalReadDuration.subscribe().distinctUntilChanged(),
) { (searchQuery, categories, favorites), (tracksMap, trackingFilters), (includedCategories, excludedCategories), itemPreferences, _ ->
) { (searchQuery, categories, favorites), (tracksMap, trackingFilters), (includedCategories, excludedCategories), itemPreferences ->
val estimatedTimeLeftByMangaId = computeEstimatedTimeLeftByMangaId(favorites)
val favoritesWithEstimatedTimeLeft = favorites.map { item ->
item.copy(

View file

@ -0,0 +1,14 @@
package tachiyomi.domain.history.interactor
import tachiyomi.domain.history.model.History
import tachiyomi.domain.history.repository.HistoryRepository
class GetReadDurationEntriesByMangaIds(
private val repository: HistoryRepository,
) {
suspend fun await(mangaIds: List<Long>): List<History> {
return mangaIds.flatMap { mangaId ->
repository.getHistoryByMangaId(mangaId)
}
}
}