mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-18 07:51:46 +00:00
add watched badge in folder details
This commit is contained in:
parent
03e4dd3809
commit
4804bc6966
1 changed files with 7 additions and 0 deletions
|
|
@ -63,6 +63,8 @@ import com.nuvio.app.features.home.canOpenCatalog
|
||||||
import com.nuvio.app.features.home.stableKey
|
import com.nuvio.app.features.home.stableKey
|
||||||
import com.nuvio.app.features.home.components.HomeCatalogRowSection
|
import com.nuvio.app.features.home.components.HomeCatalogRowSection
|
||||||
import com.nuvio.app.features.library.LibraryRepository
|
import com.nuvio.app.features.library.LibraryRepository
|
||||||
|
import com.nuvio.app.features.watched.WatchedRepository
|
||||||
|
import com.nuvio.app.features.watching.application.WatchingState
|
||||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||||
import kotlinx.coroutines.flow.filter
|
import kotlinx.coroutines.flow.filter
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
||||||
|
|
@ -210,6 +212,7 @@ private fun TabbedGridContent(
|
||||||
LibraryRepository.ensureLoaded()
|
LibraryRepository.ensureLoaded()
|
||||||
LibraryRepository.uiState
|
LibraryRepository.uiState
|
||||||
}.collectAsStateWithLifecycle()
|
}.collectAsStateWithLifecycle()
|
||||||
|
val watchedUiState by WatchedRepository.uiState.collectAsStateWithLifecycle()
|
||||||
|
|
||||||
LaunchedEffect(gridState, uiState.selectedTabIndex, uiState.selectedTabCanLoadMore, uiState.selectedTabIsLoadingMore) {
|
LaunchedEffect(gridState, uiState.selectedTabIndex, uiState.selectedTabCanLoadMore, uiState.selectedTabIsLoadingMore) {
|
||||||
snapshotFlow { gridState.layoutInfo }
|
snapshotFlow { gridState.layoutInfo }
|
||||||
|
|
@ -300,6 +303,10 @@ private fun TabbedGridContent(
|
||||||
imageUrl = item.poster,
|
imageUrl = item.poster,
|
||||||
shape = NuvioPosterShape.Poster,
|
shape = NuvioPosterShape.Poster,
|
||||||
detailLine = item.releaseInfo,
|
detailLine = item.releaseInfo,
|
||||||
|
isWatched = WatchingState.isPosterWatched(
|
||||||
|
watchedKeys = watchedUiState.watchedKeys,
|
||||||
|
item = item,
|
||||||
|
),
|
||||||
isSaved = isSaved,
|
isSaved = isSaved,
|
||||||
onClick = { onPosterClick(item) },
|
onClick = { onPosterClick(item) },
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue