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:
@@ -9,7 +9,6 @@ struct FeedView: View {
|
||||
|
||||
#if os(tvOS)
|
||||
@Default(.subscriptionsListingStyle) private var subscriptionsListingStyle
|
||||
@Default(.hideShorts) private var hideShorts
|
||||
#endif
|
||||
|
||||
var videos: [ContentItem] {
|
||||
@@ -55,7 +54,7 @@ struct FeedView: View {
|
||||
SubscriptionsPageButton()
|
||||
ListingStyleButtons(listingStyle: $subscriptionsListingStyle)
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
HideShortsButtons()
|
||||
#endif
|
||||
|
||||
if showCacheStatus {
|
||||
|
@@ -10,7 +10,6 @@ struct SubscriptionsView: View {
|
||||
|
||||
@Default(.subscriptionsViewPage) private var subscriptionsViewPage
|
||||
@Default(.subscriptionsListingStyle) private var subscriptionsListingStyle
|
||||
@Default(.hideShorts) private var hideShorts
|
||||
|
||||
@ObservedObject private var feed = FeedModel.shared
|
||||
@ObservedObject private var subscriptions = SubscribedChannelsModel.shared
|
||||
@@ -28,8 +27,6 @@ struct SubscriptionsView: View {
|
||||
}
|
||||
}
|
||||
.environment(\.listingStyle, subscriptionsListingStyle)
|
||||
.environment(\.hideShorts, hideShorts)
|
||||
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
@@ -47,7 +44,7 @@ struct SubscriptionsView: View {
|
||||
ToolbarItemGroup {
|
||||
ListingStyleButtons(listingStyle: $subscriptionsListingStyle)
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
HideShortsButtons()
|
||||
toggleWatchedButton
|
||||
.id(feed.watchedId)
|
||||
playUnwatchedButton
|
||||
@@ -75,7 +72,7 @@ struct SubscriptionsView: View {
|
||||
|
||||
Section {
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
HideShortsButtons()
|
||||
}
|
||||
|
||||
playUnwatchedButton
|
||||
|
Reference in New Issue
Block a user