From b058474d3142314e9c22c2ac485841845368a435 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 21 Oct 2026 22:16:23 +0200 Subject: [PATCH] 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. --- Yattee/Views/Components/TappableVideoModifier.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Yattee/Views/Components/TappableVideoModifier.swift b/Yattee/Views/Components/TappableVideoModifier.swift index 9d48705c..0f000f4c 100644 --- a/Yattee/Views/Components/TappableVideoModifier.swift +++ b/Yattee/Views/Components/TappableVideoModifier.swift @@ -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 }