mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Playback modes
This commit is contained in:
@@ -80,12 +80,8 @@ struct PlaylistsView: View {
|
||||
Spacer()
|
||||
|
||||
if currentPlaylist != nil {
|
||||
HStack(spacing: 0) {
|
||||
playButton
|
||||
|
||||
shuffleButton
|
||||
}
|
||||
.offset(x: 10)
|
||||
playButton
|
||||
.offset(x: 10)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal)
|
||||
@@ -180,7 +176,6 @@ struct PlaylistsView: View {
|
||||
.labelStyle(.iconOnly)
|
||||
|
||||
playButton
|
||||
shuffleButton
|
||||
}
|
||||
|
||||
Spacer()
|
||||
@@ -293,6 +288,7 @@ struct PlaylistsView: View {
|
||||
|
||||
private var playButton: some View {
|
||||
Button {
|
||||
player.playbackMode = .queue
|
||||
player.play(items.compactMap(\.video))
|
||||
} label: {
|
||||
Image(systemName: "play")
|
||||
@@ -301,16 +297,6 @@ struct PlaylistsView: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var shuffleButton: some View {
|
||||
Button {
|
||||
player.play(items.compactMap(\.video), shuffling: true)
|
||||
} label: {
|
||||
Image(systemName: "shuffle")
|
||||
.padding(8)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
}
|
||||
|
||||
private var currentPlaylist: Playlist? {
|
||||
model.find(id: selectedPlaylistID) ?? model.all.first
|
||||
}
|
||||
|
Reference in New Issue
Block a user