mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 13:12:53 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user