Refactor hide shorts

This commit is contained in:
Arkadiusz Fal
2023-05-23 18:54:53 +02:00
parent 1e23809359
commit 50e1491990
11 changed files with 25 additions and 47 deletions

View File

@@ -10,7 +10,6 @@ struct PopularView: View {
@State private var error: RequestError?
@Default(.popularListingStyle) private var popularListingStyle
@Default(.hideShorts) private var hideShorts
var resource: Resource? {
accounts.api.popular
@@ -76,7 +75,7 @@ struct PopularView: View {
}
ToolbarItem {
HideShortsButtons(hide: $hideShorts)
HideShortsButtons()
}
}
#else
@@ -95,7 +94,7 @@ struct PopularView: View {
Section {
HideWatchedButtons()
HideShortsButtons(hide: $hideShorts)
HideShortsButtons()
}
Section {
@@ -135,7 +134,7 @@ struct PopularView: View {
Spacer()
ListingStyleButtons(listingStyle: $popularListingStyle)
HideWatchedButtons()
HideShortsButtons(hide: $hideShorts)
HideShortsButtons()
Button {
resource?.load()