mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Refactor hide shorts
This commit is contained in:
@@ -30,7 +30,6 @@ 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]()
|
||||
|
||||
@@ -71,13 +70,12 @@ struct SearchView: View {
|
||||
#endif
|
||||
}
|
||||
.environment(\.listingStyle, searchListingStyle)
|
||||
.environment(\.hideShorts, hideShorts)
|
||||
.toolbar {
|
||||
#if os(macOS)
|
||||
ToolbarItemGroup(placement: toolbarPlacement) {
|
||||
ListingStyleButtons(listingStyle: $searchListingStyle)
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
HideShortsButtons()
|
||||
FavoriteButton(item: favoriteItem)
|
||||
.id(favoriteItem?.id)
|
||||
|
||||
@@ -216,7 +214,7 @@ struct SearchView: View {
|
||||
|
||||
Section {
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
HideShortsButtons()
|
||||
}
|
||||
|
||||
Section {
|
||||
@@ -574,7 +572,7 @@ struct SearchView: View {
|
||||
Spacer()
|
||||
ListingStyleButtons(listingStyle: $searchListingStyle)
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
HideShortsButtons()
|
||||
}
|
||||
.labelStyle(.iconOnly)
|
||||
.padding(.leading, 30)
|
||||
|
Reference in New Issue
Block a user