diff --git a/Shared/Channels/ChannelPlaylistView.swift b/Shared/Channels/ChannelPlaylistView.swift index 7a914158..0e6e46f1 100644 --- a/Shared/Channels/ChannelPlaylistView.swift +++ b/Shared/Channels/ChannelPlaylistView.swift @@ -58,7 +58,7 @@ struct ChannelPlaylistView: View { .labelStyle(.iconOnly) } - playButton + playButtons .labelStyle(.iconOnly) } #endif @@ -105,7 +105,7 @@ struct ChannelPlaylistView: View { favoriteButton - playButton + playButtons } } } @@ -122,6 +122,8 @@ struct ChannelPlaylistView: View { #if os(iOS) private var playlistMenu: some View { Menu { + playButtons + favoriteButton ListingStyleButtons(listingStyle: $channelPlaylistListingStyle) @@ -161,13 +163,13 @@ struct ChannelPlaylistView: View { #endif } - private var playButton: some View { - Button { - player.play(videos) - } label: { - Label("Play All", systemImage: "play") - } - .contextMenu { + private var playButtons: some View { + Group { + Button { + player.play(videos) + } label: { + Label("Play All", systemImage: "play") + } Button { player.play(videos, shuffling: true) } label: { diff --git a/Shared/Channels/ChannelVideosView.swift b/Shared/Channels/ChannelVideosView.swift index 37b7cc8c..57b3a5d5 100644 --- a/Shared/Channels/ChannelVideosView.swift +++ b/Shared/Channels/ChannelVideosView.swift @@ -383,12 +383,7 @@ struct ChannelVideosView: View { struct ChannelVideosView_Previews: PreviewProvider { static var previews: some View { - ChannelVideosView(channel: Video.fixture.channel) - .environment(\.navigationStyle, .tab) - .injectFixtureEnvironmentObjects() - NavigationView { - Spacer() ChannelVideosView(channel: Video.fixture.channel) .environment(\.navigationStyle, .sidebar) } diff --git a/Shared/Playlists/PlaylistsView.swift b/Shared/Playlists/PlaylistsView.swift index fdc521ac..70b0d58d 100644 --- a/Shared/Playlists/PlaylistsView.swift +++ b/Shared/Playlists/PlaylistsView.swift @@ -202,10 +202,16 @@ struct PlaylistsView: View { #if os(iOS) var playlistsMenu: some View { - Menu { + let title = currentPlaylist?.title ?? "Playlists" + return Menu { + Menu { + selectPlaylistButton + } label: { + Label(title, systemImage: "list.and.film") + } Section { if let currentPlaylist { - playButton + playButtons editPlaylistButton @@ -219,8 +225,6 @@ struct PlaylistsView: View { newPlaylistButton } - selectPlaylistButton - ListingStyleButtons(listingStyle: $playlistListingStyle) Section { @@ -231,7 +235,7 @@ struct PlaylistsView: View { HStack(spacing: 6) { Image(systemName: "list.and.film") - Text(currentPlaylist?.title ?? "Playlists") + Text(title) .font(.headline) } .foregroundColor(.primary) @@ -267,7 +271,7 @@ struct PlaylistsView: View { FavoriteButton(item: FavoriteItem(section: .playlist(accounts.current.id, playlist.id))) .labelStyle(.iconOnly) - playButton + playButtons } Spacer() @@ -362,13 +366,13 @@ struct PlaylistsView: View { } } - private var playButton: some View { - Button { - player.play(items.compactMap(\.video)) - } label: { - Label("Play", systemImage: "play") - } - .contextMenu { + private var playButtons: some View { + Group { + Button { + player.play(items.compactMap(\.video)) + } label: { + Label("Play", systemImage: "play") + } Button { player.play(items.compactMap(\.video), shuffling: true) } label: { diff --git a/Shared/Videos/VideoBanner.swift b/Shared/Videos/VideoBanner.swift index 1fbc8181..c6cd7bbb 100644 --- a/Shared/Videos/VideoBanner.swift +++ b/Shared/Videos/VideoBanner.swift @@ -38,7 +38,7 @@ struct VideoBanner: View { HStack(alignment: .top, spacing: 12) { VStack(alignment: .trailing, spacing: 2) { smallThumbnail - + if !timeOnThumbnail, let timeLabel { Text(timeLabel) .font(.caption.monospacedDigit())