Listing styles

This commit is contained in:
Arkadiusz Fal
2022-12-12 01:18:29 +01:00
parent c2d16774f7
commit 25da312966
19 changed files with 305 additions and 45 deletions

View File

@@ -29,6 +29,7 @@ struct SearchView: View {
@Default(.recentlyOpened) private var recentlyOpened
@Default(.saveRecents) private var saveRecents
@Default(.showHome) private var showHome
@Default(.searchListingStyle) private var searchListingStyle
private var videos = [Video]()
@@ -68,9 +69,11 @@ struct SearchView: View {
}
#endif
}
.environment(\.listingStyle, searchListingStyle)
.toolbar {
#if os(macOS)
ToolbarItemGroup(placement: toolbarPlacement) {
ListingStyleButtons(listingStyle: $searchListingStyle)
FavoriteButton(item: favoriteItem)
.id(favoriteItem?.id)
@@ -212,6 +215,8 @@ struct SearchView: View {
}
}
ListingStyleButtons(listingStyle: $searchListingStyle)
Section {
SettingsButtons()
}