mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +02:00
Fix backdrop not clearing on favorite tab changes (#507)
## Description Fixes the backdrop not being cleared when switching tabs on the favorites page by ensuring each has a unique view model. Also clears the backdrop if the view option to show details is turned off. ### Related issues #476 #499
This commit is contained in:
parent
fd260f2709
commit
c5214d886e
1 changed files with 4 additions and 1 deletions
|
|
@ -205,6 +205,9 @@ class CollectionFolderViewModel
|
||||||
this.viewOptions.value = viewOptions
|
this.viewOptions.value = viewOptions
|
||||||
viewModelScope.launch(ExceptionHandler() + Dispatchers.IO) {
|
viewModelScope.launch(ExceptionHandler() + Dispatchers.IO) {
|
||||||
saveLibraryDisplayInfo(viewOptions = viewOptions)
|
saveLibraryDisplayInfo(viewOptions = viewOptions)
|
||||||
|
if (!viewOptions.showDetails) {
|
||||||
|
backdropService.clearBackdrop()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -514,7 +517,7 @@ fun CollectionFolderGrid(
|
||||||
playEnabled: Boolean,
|
playEnabled: Boolean,
|
||||||
defaultViewOptions: ViewOptions,
|
defaultViewOptions: ViewOptions,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
viewModel: CollectionFolderViewModel = hiltViewModel(),
|
viewModel: CollectionFolderViewModel = hiltViewModel(key = itemId),
|
||||||
playlistViewModel: AddPlaylistViewModel = hiltViewModel(),
|
playlistViewModel: AddPlaylistViewModel = hiltViewModel(),
|
||||||
initialSortAndDirection: SortAndDirection? = null,
|
initialSortAndDirection: SortAndDirection? = null,
|
||||||
showTitle: Boolean = true,
|
showTitle: Boolean = true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue