Save sort & filter within a genre or studio (#1711)

## Description
Saves the sort and filter of items within a genre or studio
(Movies->Genres tab->Click genre) across genres or studios. So if you
open "Action" movies and change the sort, the sort will be used for
"Animation" or "Horror" movies.

This is saved separate from the sort/filter on the Library tab.

### Related issues
Closes https://github.com/damontecres/Wholphin/issues/1253

### Testing
Emulator by switching sorts

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-07-15 20:25:43 -04:00 • committed by GitHub
parent 84f6035103
commit c2aab06c0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 5 deletions

View file

@ -160,7 +160,8 @@ class CollectionFolderViewModel
val libraryDisplayInfo =
serverRepository.currentUser?.let { user ->
libraryDisplayInfoDao.getItem(user, itemId)
val id = collectionFilter.libraryDisplayInfoIdOverride ?: itemId
libraryDisplayInfoDao.getItem(user, id)
}
_state.update {
it.copy(
@ -237,7 +238,7 @@ class CollectionFolderViewModel
val libraryDisplayInfo =
LibraryDisplayInfo(
userId = user.rowId,
itemId = itemId,
itemId = collectionFilter.libraryDisplayInfoIdOverride ?: itemId,
sort = newSort.sort,
direction = newSort.direction,
filter = newFilter,