Add hiding short videos

This commit is contained in:
Arkadiusz Fal
2023-02-25 16:42:18 +01:00
parent ef401168ec
commit 2b18f0cffa
18 changed files with 163 additions and 20 deletions

View File

@@ -30,6 +30,7 @@ struct SearchView: View {
@Default(.saveRecents) private var saveRecents
@Default(.showHome) private var showHome
@Default(.searchListingStyle) private var searchListingStyle
@Default(.hideShorts) private var hideShorts
private var videos = [Video]()
@@ -70,10 +71,12 @@ struct SearchView: View {
#endif
}
.environment(\.listingStyle, searchListingStyle)
.environment(\.hideShorts, hideShorts)
.toolbar {
#if os(macOS)
ToolbarItemGroup(placement: toolbarPlacement) {
ListingStyleButtons(listingStyle: $searchListingStyle)
HideShortsButtons(hide: $hideShorts)
FavoriteButton(item: favoriteItem)
.id(favoriteItem?.id)
@@ -210,6 +213,10 @@ struct SearchView: View {
ListingStyleButtons(listingStyle: $searchListingStyle)
Section {
HideShortsButtons(hide: $hideShorts)
}
Section {
SettingsButtons()
}