mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Watch Next menu improvements
This commit is contained in:
@@ -87,11 +87,9 @@ struct PlayerQueueView: View {
|
||||
ForEach(player.queue) { item in
|
||||
PlayerQueueRow(item: item)
|
||||
.contextMenu {
|
||||
removeButton(item)
|
||||
removeAllButton()
|
||||
|
||||
if let video = item.video {
|
||||
VideoContextMenuView(video: video)
|
||||
.environment(\.inQueueListing, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,22 +114,6 @@ struct PlayerQueueView: View {
|
||||
.transaction { t in t.disablesAnimations = true }
|
||||
}
|
||||
}
|
||||
|
||||
private func removeButton(_ item: PlayerQueueItem) -> some View {
|
||||
Button {
|
||||
player.remove(item)
|
||||
} label: {
|
||||
Label("Remove from the queue", systemImage: "trash")
|
||||
}
|
||||
}
|
||||
|
||||
private func removeAllButton() -> some View {
|
||||
Button {
|
||||
player.removeQueueItems()
|
||||
} label: {
|
||||
Label("Clear the queue", systemImage: "trash.fill")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct PlayerQueueView_Previews: PreviewProvider {
|
||||
|
Reference in New Issue
Block a user