Fix settings done button logic (#1809)
* Fix settings done button logic With the new customizable tab bar, "Settings" can be rendered directly as the root view of a tab bar entry instead of as a "modal" presented from the root view. The "Done" button to dismiss the modal should be hidden if `isModal` is `false`. * Hide Settings secondary column button for iPad when presented as a modal
This commit is contained in:
parent
442a7938ca
commit
245f13d59f
|
@ -53,7 +53,7 @@ struct SettingsTabs: View {
|
|||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar)
|
||||
.toolbar {
|
||||
if UIDevice.current.userInterfaceIdiom == .phone || isModal {
|
||||
if isModal {
|
||||
ToolbarItem {
|
||||
Button {
|
||||
dismiss()
|
||||
|
@ -62,7 +62,7 @@ struct SettingsTabs: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
if UIDevice.current.userInterfaceIdiom == .pad, !preferences.showiPadSecondaryColumn {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad, !preferences.showiPadSecondaryColumn, !isModal {
|
||||
SecondaryColumnToolbarItem()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue