Fix library ETA compile by adding history interactor
Some checks failed
Forgejo Release Builder / release (push) Failing after 8m38s
Some checks failed
Forgejo Release Builder / release (push) Failing after 8m38s
This commit is contained in:
parent
fe3e366181
commit
780ef2af25
2 changed files with 15 additions and 2 deletions
|
|
@ -194,8 +194,7 @@ class LibraryScreenModel(
|
||||||
),
|
),
|
||||||
// KMK <--
|
// KMK <--
|
||||||
getLibraryItemPreferencesFlow(),
|
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 estimatedTimeLeftByMangaId = computeEstimatedTimeLeftByMangaId(favorites)
|
||||||
val favoritesWithEstimatedTimeLeft = favorites.map { item ->
|
val favoritesWithEstimatedTimeLeft = favorites.map { item ->
|
||||||
item.copy(
|
item.copy(
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue