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:
@@ -10,6 +10,7 @@ struct FeedView: View {
|
||||
|
||||
#if os(tvOS)
|
||||
@Default(.subscriptionsListingStyle) private var subscriptionsListingStyle
|
||||
@Default(.hideShorts) private var hideShorts
|
||||
#endif
|
||||
|
||||
var videos: [ContentItem] {
|
||||
@@ -54,6 +55,7 @@ struct FeedView: View {
|
||||
#if os(tvOS)
|
||||
SubscriptionsPageButton()
|
||||
ListingStyleButtons(listingStyle: $subscriptionsListingStyle)
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
#endif
|
||||
|
||||
if showCacheStatus {
|
||||
@@ -82,6 +84,7 @@ struct FeedView: View {
|
||||
.padding(.leading, 30)
|
||||
#if os(tvOS)
|
||||
.padding(.bottom, 15)
|
||||
.padding(.trailing, 30)
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -94,7 +97,7 @@ struct FeedView: View {
|
||||
}
|
||||
}
|
||||
|
||||
struct SubscriptonsView_Previews: PreviewProvider {
|
||||
struct FeedView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
NavigationView {
|
||||
FeedView()
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user