Skip to content

Automatic first track selection not working after clearing and re-adding files (Skia Desktop only) #25

@TimGels

Description

@TimGels

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

  1. Add a file to the application (Input tab)
  2. Navigate to one of the track configuration tabs (e.g., Subtitle, Audio, or Video)
  3. Return to the Input tab
  4. Clear the file list
  5. Add a file again
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingskiauno-platformIssues related to Uno Platform framework behavior. May require upstream fix.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions