mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Fix movie page library & collection tabs not updating (#594)
## Description Ensures the tabs on movie page use separate view models so the data isn't shared between them. ### Related issues Fixes #591
This commit is contained in:
parent
aa194f5a2d
commit
622a99631b
2 changed files with 6 additions and 1 deletions
|
|
@ -518,6 +518,7 @@ fun CollectionFolderGrid(
|
|||
playEnabled: Boolean,
|
||||
defaultViewOptions: ViewOptions,
|
||||
modifier: Modifier = Modifier,
|
||||
viewModelKey: String? = itemId.toServerString(),
|
||||
initialSortAndDirection: SortAndDirection? = null,
|
||||
showTitle: Boolean = true,
|
||||
positionCallback: ((columns: Int, position: Int) -> Unit)? = null,
|
||||
|
|
@ -531,6 +532,7 @@ fun CollectionFolderGrid(
|
|||
onClickItem,
|
||||
sortOptions,
|
||||
playEnabled,
|
||||
viewModelKey = viewModelKey,
|
||||
defaultViewOptions = defaultViewOptions,
|
||||
modifier = modifier,
|
||||
initialSortAndDirection = initialSortAndDirection,
|
||||
|
|
@ -551,6 +553,7 @@ fun CollectionFolderGrid(
|
|||
playEnabled: Boolean,
|
||||
defaultViewOptions: ViewOptions,
|
||||
modifier: Modifier = Modifier,
|
||||
viewModelKey: String? = itemId,
|
||||
initialSortAndDirection: SortAndDirection? = null,
|
||||
showTitle: Boolean = true,
|
||||
positionCallback: ((columns: Int, position: Int) -> Unit)? = null,
|
||||
|
|
@ -559,7 +562,7 @@ fun CollectionFolderGrid(
|
|||
playlistViewModel: AddPlaylistViewModel = hiltViewModel(),
|
||||
viewModel: CollectionFolderViewModel =
|
||||
hiltViewModel<CollectionFolderViewModel, CollectionFolderViewModel.Factory>(
|
||||
key = itemId,
|
||||
key = viewModelKey,
|
||||
) {
|
||||
it.create(
|
||||
itemId = itemId,
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ fun CollectionFolderMovie(
|
|||
preferencesViewModel.navigationManager.navigateTo(item.destination())
|
||||
},
|
||||
itemId = destination.itemId,
|
||||
viewModelKey = "${destination.itemId}_library",
|
||||
initialFilter =
|
||||
CollectionFolderFilter(
|
||||
filter =
|
||||
|
|
@ -146,6 +147,7 @@ fun CollectionFolderMovie(
|
|||
preferencesViewModel.navigationManager.navigateTo(item.destination())
|
||||
},
|
||||
itemId = destination.itemId,
|
||||
viewModelKey = "${destination.itemId}_collection",
|
||||
initialFilter =
|
||||
CollectionFolderFilter(
|
||||
filter =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue