Skip the queue sheet when the current video has finished

Tapping a video after the current one played to the end asked Play Now or Play Next, though replacing a finished video loses nothing. An ended video no longer counts as active playback; a non-empty queue still shows the sheet.
This commit is contained in:
Arkadiusz Fal
2026-10-21 22:16:23 +02:00
parent 582aa56644
commit b058474d31

View File

@@ -42,7 +42,9 @@ struct TappableVideoModifier: ViewModifier {
guard let env = appEnvironment else { return false }
let queueEnabled = env.settingsManager.queueEnabled
let state = env.playerService.state
let hasActivePlayback = state.currentVideo != nil || !state.queue.isEmpty
// A video that played to the end no longer counts: replacing it loses nothing.
let hasUnfinishedVideo = state.currentVideo != nil && state.playbackState != .ended
let hasActivePlayback = hasUnfinishedVideo || !state.queue.isEmpty
return queueEnabled && hasActivePlayback
}