Fixes missing parental ratings & focus loss when changing filters (#1559)

## Description
- Ensures all parent ratings are shown in the filter drop down
- Fixes focus loss after filtering library and there are no results

### Related issues
Fixes #1535 (along w/ #1529)
Fixes #1534

### Testing
Emulator w/ a UK movie library

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-06-10 19:29:49 -04:00 • committed by GitHub
parent 01bd3249fa
commit f7f0ea9cca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 33 additions and 11 deletions

View file

@ -124,9 +124,9 @@ class FilterOptionCache
parentId = parentId,
userId = userId,
).content.officialRatings
?.mapNotNull { r ->
val value = ratings[r]
value?.let { FilterValueOption(r, value) }
?.map { r ->
val value = ratings[r] ?: 0
FilterValueOption(r, value)
}?.sortedBy { it.value as Int }
.orEmpty()
}