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:
@@ -24,6 +24,7 @@ struct PlaylistsView: View {
|
||||
|
||||
@Default(.playlistListingStyle) private var playlistListingStyle
|
||||
@Default(.showCacheStatus) private var showCacheStatus
|
||||
@Default(.hideShorts) private var hideShorts
|
||||
|
||||
var items: [ContentItem] {
|
||||
var videos = currentPlaylist?.videos ?? []
|
||||
@@ -95,6 +96,7 @@ struct PlaylistsView: View {
|
||||
}
|
||||
.environment(\.currentPlaylistID, currentPlaylist?.id)
|
||||
.environment(\.listingStyle, playlistListingStyle)
|
||||
.environment(\.hideShorts, hideShorts)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,6 +169,9 @@ struct PlaylistsView: View {
|
||||
ToolbarItem {
|
||||
ListingStyleButtons(listingStyle: $playlistListingStyle)
|
||||
}
|
||||
ToolbarItem {
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
}
|
||||
}
|
||||
#else
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
||||
@@ -234,6 +239,10 @@ struct PlaylistsView: View {
|
||||
|
||||
ListingStyleButtons(listingStyle: $playlistListingStyle)
|
||||
|
||||
Section {
|
||||
HideShortsButtons(hide: $hideShorts)
|
||||
}
|
||||
|
||||
Section {
|
||||
SettingsButtons()
|
||||
}
|
||||
|
Reference in New Issue
Block a user