Description
There is a bug affecting automatic track selection that only occurs when using the cross-platform Skia renderer desktop target. The Windows AppSDK target does not exhibit this issue.
Steps to Reproduce
- Add a file to the application (Input tab)
- Navigate to one of the track configuration tabs (e.g., Subtitle, Audio, or Video)
- Return to the Input tab
- Clear the file list
- Add a file again
- Navigate back to the previously visited track configuration tab
Expected Behavior
The first track should be automatically selected when navigating to the track configuration tab, as it is on first visit and as it behaves on the Windows AppSDK target.
Actual Behavior
The automatic first track selection does not occur. No track is selected in the track configuration tab.
Environment
- Affected Target: Skia Desktop Renderer (cross-platform)
- Working Target: Windows AppSDK
- Framework: .NET 10 / Uno Platform
Additional Context
The issue appears to be related to the lifecycle or state management when clearing and re-adding files, specifically in how the track ViewModels (e.g., SubtitleViewModel, AudioViewModel, VideoViewModel) handle the SelectedTrack property after the file list is modified.
The automatic selection logic in the track ViewModels sets SelectedTrack = SubtitleTracks.FirstOrDefault() in the OnBatchConfigurationSubtitleTracksChanged method, which should be triggered when tracks are updated. This works correctly on Windows AppSDK but appears to fail on Skia Desktop in this specific navigation scenario.
Description
There is a bug affecting automatic track selection that only occurs when using the cross-platform Skia renderer desktop target. The Windows AppSDK target does not exhibit this issue.
Steps to Reproduce
Expected Behavior
The first track should be automatically selected when navigating to the track configuration tab, as it is on first visit and as it behaves on the Windows AppSDK target.
Actual Behavior
The automatic first track selection does not occur. No track is selected in the track configuration tab.
Environment
Additional Context
The issue appears to be related to the lifecycle or state management when clearing and re-adding files, specifically in how the track ViewModels (e.g.,
SubtitleViewModel,AudioViewModel,VideoViewModel) handle theSelectedTrackproperty after the file list is modified.The automatic selection logic in the track ViewModels sets
SelectedTrack = SubtitleTracks.FirstOrDefault()in theOnBatchConfigurationSubtitleTracksChangedmethod, which should be triggered when tracks are updated. This works correctly on Windows AppSDK but appears to fail on Skia Desktop in this specific navigation scenario.