mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 06:10:32 +05:30
Fix channel videos horizontal layout
This commit is contained in:
parent
8f9de6d1be
commit
d5f8e35430
@ -66,7 +66,7 @@ struct ChannelVideosView: View {
|
|||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VerticalCells(items: contentItems) {
|
VerticalCells(items: contentItems, edgesIgnoringSafeArea: .init()) {
|
||||||
if let description = presentedChannel?.description, !description.isEmpty {
|
if let description = presentedChannel?.description, !description.isEmpty {
|
||||||
Button {
|
Button {
|
||||||
withAnimation(.spring()) {
|
withAnimation(.spring()) {
|
||||||
|
@ -12,11 +12,13 @@ struct VerticalCells<Header: View>: View {
|
|||||||
|
|
||||||
var items = [ContentItem]()
|
var items = [ContentItem]()
|
||||||
var allowEmpty = false
|
var allowEmpty = false
|
||||||
|
var edgesIgnoringSafeArea = Edge.Set.horizontal
|
||||||
|
|
||||||
let header: Header?
|
let header: Header?
|
||||||
init(items: [ContentItem], allowEmpty: Bool = false, @ViewBuilder header: @escaping () -> Header? = { nil }) {
|
init(items: [ContentItem], allowEmpty: Bool = false, edgesIgnoringSafeArea: Edge.Set = .horizontal, @ViewBuilder header: @escaping () -> Header? = { nil }) {
|
||||||
self.items = items
|
self.items = items
|
||||||
self.allowEmpty = allowEmpty
|
self.allowEmpty = allowEmpty
|
||||||
|
self.edgesIgnoringSafeArea = edgesIgnoringSafeArea
|
||||||
self.header = header()
|
self.header = header()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +42,7 @@ struct VerticalCells<Header: View>: View {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
.animation(nil)
|
.animation(nil)
|
||||||
.edgesIgnoringSafeArea(.horizontal)
|
.edgesIgnoringSafeArea(edgesIgnoringSafeArea)
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
.background(Color.secondaryBackground)
|
.background(Color.secondaryBackground)
|
||||||
.frame(minWidth: 360)
|
.frame(minWidth: 360)
|
||||||
|
Loading…
Reference in New Issue
Block a user