mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 10:25:02 +00:00
Use video context menu ControlGroup only on iOS
This commit is contained in:
@@ -235,23 +235,8 @@ struct VideoContextMenuContent: View {
|
||||
appEnvironment?.dataManager.watchEntry(for: video.id.videoID)?.isFinished ?? false
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
// Custom actions at the top
|
||||
ForEach(customActions.indices, id: \.self) { index in
|
||||
let action = customActions[index]
|
||||
Button(role: action.role) {
|
||||
action.action()
|
||||
} label: {
|
||||
Label(action.label, systemImage: action.systemImage)
|
||||
}
|
||||
}
|
||||
|
||||
// Divider after custom actions (if any)
|
||||
if !customActions.isEmpty {
|
||||
Divider()
|
||||
}
|
||||
|
||||
ControlGroup {
|
||||
@ViewBuilder
|
||||
private var playDownloadShareButtons: some View {
|
||||
// Play (hidden in player context since video is already playing)
|
||||
if showPlayAction {
|
||||
Button {
|
||||
@@ -301,6 +286,30 @@ struct VideoContextMenuContent: View {
|
||||
#endif
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
// Custom actions at the top
|
||||
ForEach(customActions.indices, id: \.self) { index in
|
||||
let action = customActions[index]
|
||||
Button(role: action.role) {
|
||||
action.action()
|
||||
} label: {
|
||||
Label(action.label, systemImage: action.systemImage)
|
||||
}
|
||||
}
|
||||
|
||||
// Divider after custom actions (if any)
|
||||
if !customActions.isEmpty {
|
||||
Divider()
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
ControlGroup {
|
||||
playDownloadShareButtons
|
||||
}
|
||||
#else
|
||||
playDownloadShareButtons
|
||||
#endif
|
||||
|
||||
// Play from Beginning (only shown when there's saved progress)
|
||||
if showPlayAction, let startTime, startTime > 0 {
|
||||
Button {
|
||||
|
||||
Reference in New Issue
Block a user