Add context menu to related items for queuing

This commit is contained in:
Arkadiusz Fal 2021-12-01 12:22:19 +01:00
parent 1c61ad37a9
commit 9f5e9ea237

View File

@ -9,6 +9,18 @@ struct RelatedView: View {
Section(header: Text("Related")) { Section(header: Text("Related")) {
ForEach(player.currentVideo!.related) { video in ForEach(player.currentVideo!.related) { video in
PlayerQueueRow(item: PlayerQueueItem(video), fullScreen: .constant(false)) PlayerQueueRow(item: PlayerQueueItem(video), fullScreen: .constant(false))
.contextMenu {
Button {
player.playNext(video)
} label: {
Label("Play Next", systemImage: "text.insert")
}
Button {
player.enqueueVideo(video)
} label: {
Label("Play Last", systemImage: "text.append")
}
}
} }
} }
} }