mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Listing styles
This commit is contained in:
@@ -3,12 +3,20 @@ import SwiftUI
|
||||
|
||||
struct ContentItemView: View {
|
||||
let item: ContentItem
|
||||
@Environment(\.listingStyle) private var listingStyle
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
switch item.contentType {
|
||||
case .video:
|
||||
VideoCell(video: item.video)
|
||||
if listingStyle == .cells {
|
||||
VideoCell(video: item.video)
|
||||
} else {
|
||||
PlayerQueueRow(item: .init(item.video))
|
||||
.contextMenu {
|
||||
VideoContextMenuView(video: item.video)
|
||||
}
|
||||
}
|
||||
case .playlist:
|
||||
ChannelPlaylistCell(playlist: item.playlist)
|
||||
case .channel:
|
||||
|
Reference in New Issue
Block a user