mirror of
https://github.com/yattee/yattee.git
synced 2026-11-02 09:57:20 +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:
@@ -106,7 +106,6 @@ struct VideoInfoView: View {
|
||||
@State private var showingRemoveDownloadConfirmation = false
|
||||
|
||||
// Resume action sheet state
|
||||
@State private var resumeSheetData: ResumeSheetData?
|
||||
|
||||
// Video details cache - stores full video details loaded from API
|
||||
@State private var loadedVideoDetails: [String: Video] = [:]
|
||||
@@ -452,14 +451,6 @@ struct VideoInfoView: View {
|
||||
commentsSheetContent
|
||||
}
|
||||
#endif
|
||||
.sheet(item: $resumeSheetData) { data in
|
||||
ResumeActionSheet(
|
||||
video: data.video,
|
||||
resumeTime: data.resumeTime,
|
||||
onContinue: { playVideoWithStartTime(data.resumeTime) },
|
||||
onStartOver: { playVideoWithStartTime(0) }
|
||||
)
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.onChange(of: downloadManager?.completedDownloads) { _, newValue in
|
||||
// Update download state when completedDownloads changes
|
||||
@@ -2571,7 +2562,12 @@ struct VideoInfoView: View {
|
||||
playVideoWithStartTime(0)
|
||||
case .ask:
|
||||
// Show the resume action sheet
|
||||
resumeSheetData = ResumeSheetData(video: video, resumeTime: savedProgress)
|
||||
presentAppSheet(.resumeAction(
|
||||
video,
|
||||
resumeTime: savedProgress,
|
||||
onContinue: { playVideoWithStartTime(savedProgress) },
|
||||
onStartOver: { playVideoWithStartTime(0) }
|
||||
))
|
||||
}
|
||||
} else {
|
||||
// No saved progress or video was completed - play from beginning
|
||||
|
||||
Reference in New Issue
Block a user