Fix issue with scrolling to the right episode if there are specials in the season (#1827)

## Description
Fixes an edge case where clicking on an episode to go to Series Overview
wouldn't scroll to the episode if there is a special (season 0) episodes
in the episode list.

Dev note: to simplify things, if the entire dataset is cached, then just
search with `indexOf`. Often the data is cached because 20 seasons or
100 episodes are fetched initially which covers many shows.

### Related issues
Follow up to #1708 

### Testing
Emulator and unit tests

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-08-12 16:25:30 -04:00 • committed by GitHub
parent c6d81dada8
commit 548ec09af3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 123 additions and 37 deletions

View file

@ -24,7 +24,7 @@ import java.util.function.Predicate
*/
abstract class RequestPager<T>(
protected val scope: CoroutineScope,
protected val pageSize: Int = DEFAULT_PAGE_SIZE,
val pageSize: Int = DEFAULT_PAGE_SIZE,
cacheSize: Long = 8,
) : AbstractList<T?>(),
BlockingList<T?> {