mirror of
https://github.com/yattee/yattee.git
synced 2026-04-10 17:46:58 +00:00
Fix ContentUnavailableView centering on Apple TV
On tvOS, ContentUnavailableView inside a Group doesn't expand to fill available space — it sizes to content and aligns top-leading. Add .frame(maxWidth: .infinity, maxHeight: .infinity) to all instances so they center correctly in their parent containers.
This commit is contained in:
@@ -91,6 +91,7 @@ struct ManageChannelsView: View {
|
||||
} description: {
|
||||
Text(String(localized: "subscriptions.channels.empty"))
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
} else {
|
||||
channelsView
|
||||
}
|
||||
@@ -232,6 +233,7 @@ struct ManageChannelsView: View {
|
||||
Group {
|
||||
if filteredChannels.isEmpty {
|
||||
ContentUnavailableView.search(text: searchText)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
} else {
|
||||
switch layout {
|
||||
case .list:
|
||||
@@ -247,6 +249,7 @@ struct ManageChannelsView: View {
|
||||
Group {
|
||||
if filteredChannels.isEmpty {
|
||||
ContentUnavailableView.search(text: searchText)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
} else {
|
||||
switch layout {
|
||||
case .list:
|
||||
|
||||
@@ -423,7 +423,7 @@ struct SubscriptionsView: View {
|
||||
} description: {
|
||||
Text(String(localized: "subscriptions.noVideosFromChannel.description"))
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.padding(.vertical, 40)
|
||||
} else {
|
||||
ForEach(Array(filteredVideos.enumerated()), id: \.element.id) { index, video in
|
||||
@@ -596,7 +596,7 @@ struct SubscriptionsView: View {
|
||||
} description: {
|
||||
Text(String(localized: "subscriptions.noVideosFromChannel.description"))
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.padding(.vertical, 40)
|
||||
} else {
|
||||
VideoGridContent(columns: gridConfig.effectiveColumns) {
|
||||
@@ -691,7 +691,7 @@ struct SubscriptionsView: View {
|
||||
} description: {
|
||||
Text(String(localized: "subscriptions.empty.description"))
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.padding(.vertical, 40)
|
||||
}
|
||||
|
||||
@@ -702,7 +702,7 @@ struct SubscriptionsView: View {
|
||||
} description: {
|
||||
Text(String(localized: "subscriptions.yatteeServerRequired.description"))
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.padding(.vertical, 40)
|
||||
}
|
||||
|
||||
@@ -713,7 +713,7 @@ struct SubscriptionsView: View {
|
||||
} description: {
|
||||
Text(String(localized: "subscriptions.notAuthenticated.description"))
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.padding(.vertical, 40)
|
||||
}
|
||||
|
||||
@@ -727,7 +727,7 @@ struct SubscriptionsView: View {
|
||||
Task { await loadFeed(forceRefresh: true) }
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.padding(.vertical, 40)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user