mirror of
https://github.com/yattee/yattee.git
synced 2026-11-03 18:37:49 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user