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:
@@ -10,7 +10,6 @@ struct ChannelPlaylistView: View {
|
||||
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
@Default(.channelPlaylistListingStyle) private var channelPlaylistListingStyle
|
||||
@Default(.hideShorts) private var hideShorts
|
||||
|
||||
@ObservedObject private var accounts = AccountsModel.shared
|
||||
var player = PlayerModel.shared
|
||||
@@ -103,7 +102,7 @@ struct ChannelPlaylistView: View {
|
||||
HStack {
|
||||
ListingStyleButtons(listingStyle: $channelPlaylistListingStyle)
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
HideShortsButtons()
|
||||
ShareButton(contentItem: contentItem)
|
||||
|
||||
favoriteButton
|
||||
@@ -133,7 +132,7 @@ struct ChannelPlaylistView: View {
|
||||
|
||||
Section {
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
HideShortsButtons()
|
||||
}
|
||||
|
||||
Section {
|
||||
|
@@ -30,7 +30,6 @@ struct ChannelVideosView: View {
|
||||
|
||||
@Default(.channelPlaylistListingStyle) private var channelPlaylistListingStyle
|
||||
@Default(.expandChannelDescription) private var expandChannelDescription
|
||||
@Default(.hideShorts) private var hideShorts
|
||||
|
||||
var presentedChannel: Channel? {
|
||||
store.item?.channel ?? channel ?? recents.presentedChannel
|
||||
@@ -98,7 +97,6 @@ struct ChannelVideosView: View {
|
||||
.environment(\.loadMoreContentHandler) { loadNextPage() }
|
||||
.environment(\.inChannelView, true)
|
||||
.environment(\.listingStyle, channelPlaylistListingStyle)
|
||||
.environment(\.hideShorts, hideShorts)
|
||||
#if os(tvOS)
|
||||
.prefersDefaultFocus(in: focusNamespace)
|
||||
#endif
|
||||
@@ -138,7 +136,7 @@ struct ChannelVideosView: View {
|
||||
|
||||
ListingStyleButtons(listingStyle: $channelPlaylistListingStyle)
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
HideShortsButtons()
|
||||
contentTypePicker
|
||||
}
|
||||
|
||||
@@ -283,7 +281,7 @@ struct ChannelVideosView: View {
|
||||
|
||||
Section {
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
HideShortsButtons()
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
|
Reference in New Issue
Block a user