Fix tvOS episode focus (#1640)#1819
Fix tvOS episode focus (#1640)#18193aa49ec6bfc910647fa1c5a013e48eef wants to merge 6 commits intojellyfin:mainfrom
Conversation
|
I don't believe this is the correct approach. The ideal route for this would be to handle the scroll based on Just increasing the delay will still result in issues if there is a delay loading or low/poor network conditions. Edit: Please see the changes I have made to this and please confirm that this works for you. I've moved this logic to confirm that This should now always trigger in order regardless of OS/Jellyfin delays but I would appreciate you validating this from your end as well. |
Summary
SeriesEpisodeSelector.EpisodeHStackby introducing anEpisodeFocusCoordinatorthat queues pending IDs,defers FocusState writes via
withTransaction+DispatchQueue.main.async, and ensures placeholders/episodes share asingle focus path.
UIDevice.platformGeneration(tvOS only) soEpisodeHStackcan give older Apple TV hardware a slightly longerscroll delay when jumping to the play-button item.
seriesEpisodeFocusso we can trace season switches, pending focus consumption, andguard rails in Console.
Addresses #1640.
Testing
carthage update --use-xcframeworksswiftformat .swiftgen config runbundle exec fastlane buildLane scheme:"Swiftfin tvOS"(DEVELOPER_DIR=/Applications/Xcode-16.4.0.app)Pending steps (have not yet done any hardware testing)