tvOS filters for all views

Vertical list for trending, popular, playlists, search

Fix #413, #415
This commit is contained in:
Arkadiusz Fal
2023-04-22 21:07:30 +02:00
parent 6596a440a5
commit 83dfdd6c0e
11 changed files with 175 additions and 142 deletions

View File

@@ -236,27 +236,12 @@ struct SearchView: View {
if showRecentQueries {
recentQueries
} else {
#if os(tvOS)
ScrollView(.vertical, showsIndicators: false) {
HStack(spacing: 0) {
if accounts.app.supportsSearchFilters {
filtersHorizontalStack
}
FavoriteButton(item: favoriteItem)
.id(favoriteItem?.id)
.labelStyle(.iconOnly)
.font(.system(size: 25))
}
HorizontalCells(items: state.store.collection)
.environment(\.loadMoreContentHandler) { state.loadNextPage() }
VerticalCells(items: state.store.collection, allowEmpty: state.query.isEmpty) {
if shouldDisplayHeader {
header
}
.edgesIgnoringSafeArea(.horizontal)
#else
VerticalCells(items: state.store.collection, allowEmpty: state.query.isEmpty)
.environment(\.loadMoreContentHandler) { state.loadNextPage() }
#endif
}
.environment(\.loadMoreContentHandler) { state.loadNextPage() }
if noResults {
Text("No results")