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 PopularView: View {
@State private var error: RequestError?
@Default(.popularListingStyle) private var popularListingStyle
@Default(.hideShorts) private var hideShorts
var resource: Resource? {
accounts.api.popular
@@ -69,6 +70,10 @@ struct PopularView: View {
ToolbarItem {
ListingStyleButtons(listingStyle: $popularListingStyle)
}
ToolbarItem {
HideShortsButtons(hide: $hideShorts)
}
}
#else
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
@@ -84,6 +89,10 @@ struct PopularView: View {
Menu {
ListingStyleButtons(listingStyle: $popularListingStyle)
Section {
HideShortsButtons(hide: $hideShorts)
}
Section {
SettingsButtons()
}