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

@@ -10,6 +10,7 @@ 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
@@ -27,6 +28,7 @@ struct SubscriptionsView: View {
}
}
.environment(\.listingStyle, subscriptionsListingStyle)
.environment(\.hideShorts, hideShorts)
#if os(iOS)
.navigationBarTitleDisplayMode(.inline)
@@ -46,6 +48,10 @@ struct SubscriptionsView: View {
ListingStyleButtons(listingStyle: $subscriptionsListingStyle)
}
ToolbarItem {
HideShortsButtons(hide: $hideShorts)
}
ToolbarItem {
toggleWatchedButton
}
@@ -73,6 +79,10 @@ struct SubscriptionsView: View {
ListingStyleButtons(listingStyle: $subscriptionsListingStyle)
}
Section {
HideShortsButtons(hide: $hideShorts)
}
playUnwatchedButton
toggleWatchedButton