Make toolbar placement more explicit to fix problems that appeared in Xcode 12 Beta 3

This commit is contained in:
Maurice Parker 2020-07-22 21:01:02 -05:00
parent 71a6f03fd6
commit 6ebd5ad5ed
3 changed files with 10 additions and 10 deletions

View File

@ -18,7 +18,7 @@ struct ArticleToolbarModifier: ViewModifier {
.toolbar {
#if os(iOS)
ToolbarItem(placement: .navigation) {
ToolbarItem(placement: .primaryAction) {
HStack(spacing: 20) {
Button {
} label: {

View File

@ -20,7 +20,7 @@ struct SidebarToolbarModifier: ViewModifier {
content
.toolbar {
ToolbarItem(placement: .navigation) {
ToolbarItem(placement: .primaryAction) {
Button {
withAnimation {
sidebarModel.isReadFiltered.toggle()
@ -35,7 +35,7 @@ struct SidebarToolbarModifier: ViewModifier {
.help(sidebarModel.isReadFiltered ? "Show Read Feeds" : "Filter Read Feeds")
}
ToolbarItem(placement: .automatic) {
ToolbarItem(placement: .bottomBar) {
Button {
viewModel.sheetToShow = .settings
} label: {
@ -44,11 +44,11 @@ struct SidebarToolbarModifier: ViewModifier {
.help("Settings")
}
ToolbarItem {
ToolbarItem(placement: .bottomBar) {
Spacer()
}
ToolbarItem(placement: .automatic) {
ToolbarItem(placement: .bottomBar) {
switch refreshProgress.state {
case .refreshProgress(let progress):
ProgressView(value: progress)
@ -63,11 +63,11 @@ struct SidebarToolbarModifier: ViewModifier {
}
}
ToolbarItem {
ToolbarItem(placement: .bottomBar) {
Spacer()
}
ToolbarItem(placement: .automatic, content: {
ToolbarItem(placement: .bottomBar, content: {
Button {
viewModel.showActionSheet = true
} label: {

View File

@ -17,7 +17,7 @@ struct TimelineToolbarModifier: ViewModifier {
content
.toolbar {
#if os(iOS)
ToolbarItem(placement: .navigation) {
ToolbarItem(placement: .primaryAction) {
Button {
withAnimation {
timelineModel.toggleReadFilter()
@ -33,7 +33,7 @@ struct TimelineToolbarModifier: ViewModifier {
.help(timelineModel.isReadFiltered ?? false ? "Show Read Articles" : "Filter Read Articles")
}
ToolbarItem {
ToolbarItem(placement: .bottomBar) {
Button {
sceneModel.markAllAsRead()
} label: {
@ -43,7 +43,7 @@ struct TimelineToolbarModifier: ViewModifier {
.help("Mark All As Read")
}
ToolbarItem {
ToolbarItem(placement: .bottomBar) {
Spacer()
}
#endif