diff --git a/Apple TV/VideosCellsView.swift b/Apple TV/VideosCellsView.swift index 7f78273f..a9bc76c9 100644 --- a/Apple TV/VideosCellsView.swift +++ b/Apple TV/VideosCellsView.swift @@ -15,7 +15,7 @@ struct VideosCellsView: View { var body: some View { ScrollView(.vertical, showsIndicators: false) { - LazyVGrid(columns: items, spacing: 10) { + LazyVGrid(columns: items, alignment: .center, spacing: 10) { ForEach(videos) { video in VideoCellView(video: video) .contextMenu { VideoContextMenuView(video: video) } @@ -26,6 +26,10 @@ struct VideosCellsView: View { } var items: [GridItem] { - Array(repeating: .init(.fixed(600)), count: columns) + Array(repeating: .init(.fixed(600)), count: gridColumns) + } + + var gridColumns: Int { + videos.count < columns ? videos.count : columns } }