mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Add hiding short videos
This commit is contained in:
@@ -14,6 +14,7 @@ struct ChannelPlaylistView: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
@Environment(\.navigationStyle) private var navigationStyle
|
||||
@Default(.channelPlaylistListingStyle) private var channelPlaylistListingStyle
|
||||
@Default(.hideShorts) private var hideShorts
|
||||
|
||||
@ObservedObject private var accounts = AccountsModel.shared
|
||||
var player = PlayerModel.shared
|
||||
@@ -104,6 +105,7 @@ struct ChannelPlaylistView: View {
|
||||
ToolbarItem(placement: playlistButtonsPlacement) {
|
||||
HStack {
|
||||
ListingStyleButtons(listingStyle: $channelPlaylistListingStyle)
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
ShareButton(contentItem: contentItem)
|
||||
|
||||
favoriteButton
|
||||
@@ -131,6 +133,10 @@ struct ChannelPlaylistView: View {
|
||||
|
||||
ListingStyleButtons(listingStyle: $channelPlaylistListingStyle)
|
||||
|
||||
Section {
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
}
|
||||
|
||||
Section {
|
||||
SettingsButtons()
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@ struct ChannelVideosView: View {
|
||||
|
||||
@Default(.channelPlaylistListingStyle) private var channelPlaylistListingStyle
|
||||
@Default(.expandChannelDescription) private var expandChannelDescription
|
||||
@Default(.hideShorts) private var hideShorts
|
||||
|
||||
var presentedChannel: Channel? {
|
||||
store.item ?? channel ?? recents.presentedChannel
|
||||
@@ -100,6 +101,7 @@ struct ChannelVideosView: View {
|
||||
}
|
||||
.environment(\.inChannelView, true)
|
||||
.environment(\.listingStyle, channelPlaylistListingStyle)
|
||||
.environment(\.hideShorts, hideShorts)
|
||||
#if os(tvOS)
|
||||
.prefersDefaultFocus(in: focusNamespace)
|
||||
#endif
|
||||
@@ -131,6 +133,9 @@ struct ChannelVideosView: View {
|
||||
ToolbarItem {
|
||||
ListingStyleButtons(listingStyle: $channelPlaylistListingStyle)
|
||||
}
|
||||
ToolbarItem {
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
}
|
||||
ToolbarItem {
|
||||
contentTypePicker
|
||||
}
|
||||
@@ -271,6 +276,10 @@ struct ChannelVideosView: View {
|
||||
}
|
||||
|
||||
ListingStyleButtons(listingStyle: $channelPlaylistListingStyle)
|
||||
|
||||
Section {
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
HStack(spacing: 12) {
|
||||
|
Reference in New Issue
Block a user