mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Listing styles
This commit is contained in:
@@ -9,6 +9,8 @@ struct TrendingView: View {
|
||||
@Default(.trendingCategory) private var category
|
||||
@Default(.trendingCountry) private var country
|
||||
|
||||
@Default(.trendingListingStyle) private var trendingListingStyle
|
||||
|
||||
@State private var presentingCountrySelection = false
|
||||
|
||||
@State private var favoriteItem: FavoriteItem?
|
||||
@@ -46,6 +48,7 @@ struct TrendingView: View {
|
||||
.environment(\.scrollViewBottomPadding, 70)
|
||||
#endif
|
||||
}
|
||||
.environment(\.listingStyle, trendingListingStyle)
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
@@ -119,10 +122,16 @@ struct TrendingView: View {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if !os(macOS)
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
||||
resource.loadIfNeeded()
|
||||
#if os(macOS)
|
||||
.toolbar {
|
||||
ToolbarItem {
|
||||
ListingStyleButtons(listingStyle: $trendingListingStyle)
|
||||
}
|
||||
}
|
||||
#else
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
||||
resource.loadIfNeeded()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -163,6 +172,8 @@ struct TrendingView: View {
|
||||
categoryButton
|
||||
}
|
||||
|
||||
ListingStyleButtons(listingStyle: $trendingListingStyle)
|
||||
|
||||
Section {
|
||||
SettingsButtons()
|
||||
}
|
||||
|
Reference in New Issue
Block a user