Present row sheets through the shared sheet host

Each video row carried its own sheets: tappableVideo added the queue
action and resume sheets, the context menu and swipe actions added
add-to-playlist and download options, so a row could declare up to six
sheets, owned by a row that a list may recycle.

Rows now present those through the nearest sheet host, as does the
video info view's resume prompt. The queue action sheet for a tapped
description link becomes a global request instead of being declared
at both the app root and the expanded player.

Sheets take the color scheme where their host sits, so the floating
details panel's dark override no longer reaches them and the
presentationColorScheme workaround is gone.
This commit is contained in:
Arkadiusz Fal
2026-10-04 09:07:05 +02:00
parent 28a75792e8
commit e3d3809f2f
10 changed files with 39 additions and 147 deletions

View File

@@ -493,19 +493,6 @@ struct ExpandedPlayerSheet: View {
.sheet(isPresented: $showingErrorSheet) {
ErrorDetailsSheet(errorMessage: playerState?.errorMessage ?? "Unknown error")
}
.sheet(item: Binding<Video?>(
get: { appEnvironment?.navigationCoordinator.descriptionLinkQueueSheetVideo },
set: { newValue in
if newValue == nil {
appEnvironment?.navigationCoordinator.descriptionLinkQueueSheetVideo = nil
}
}
)) { video in
if let appEnvironment {
QueueActionSheet(video: video)
.appEnvironment(appEnvironment)
}
}
// Host the resolved/ambiguous link confirmation dialogs while the
// expanded player is up so they appear above this sheet rather than
// being buried underneath it on the root app view.

View File

@@ -154,7 +154,6 @@ struct FloatingDetailsPanel: View {
}
}
.environment(\.colorScheme, isPinned ? systemColorScheme : .dark)
.environment(\.presentationColorScheme, systemColorScheme)
.animation(.easeInOut(duration: 0.25), value: isPinned)
.onChange(of: video.id) { _, _ in
// Comments state is managed by parent - just reset local state