Change subscriptions view picker

This commit is contained in:
Arkadiusz Fal 2023-05-25 17:13:01 +02:00
parent 59f48c739a
commit 4d70c8a3c3

View File

@ -31,8 +31,17 @@ struct SubscriptionsView: View {
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .principal) {
HStack {
Picker("Page", selection: $subscriptionsViewPage) {
Label("Feed", systemImage: "film").tag(Page.feed)
Label("Channels", systemImage: "person.3.fill").tag(Page.channels)
}
.pickerStyle(.segmented)
subscriptionsMenu
}
.frame(maxWidth: 500)
}
ToolbarItem {
RequestErrorButton(error: requestError)
@ -61,11 +70,6 @@ struct SubscriptionsView: View {
#if os(iOS)
var subscriptionsMenu: some View {
Menu {
Picker("Page", selection: $subscriptionsViewPage) {
Label("Feed", systemImage: "film").tag(Page.feed)
Label("Channels", systemImage: "person.3.fill").tag(Page.channels)
}
if subscriptionsViewPage == .feed {
ListingStyleButtons(listingStyle: $subscriptionsListingStyle)
}
@ -84,12 +88,9 @@ struct SubscriptionsView: View {
}
} label: {
HStack(spacing: 12) {
menuLabel
.foregroundColor(.primary)
Image(systemName: "chevron.down.circle.fill")
.foregroundColor(.accentColor)
.imageScale(.small)
.imageScale(.large)
}
.transaction { t in t.animation = nil }
}