mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 05:06:58 +02:00
Add alert property to ErrorAlertInfo.
This commit is contained in:
@@ -79,22 +79,7 @@ struct LocationSharingView: View {
|
||||
ThemeService.shared().theme.applyStyle(onNavigationBar: navigationController.navigationBar)
|
||||
}
|
||||
.alert(item: $context.alertInfo) { info in
|
||||
if let secondaryButton = info.secondaryButton {
|
||||
return Alert(title: Text(info.title),
|
||||
message: info.messageText,
|
||||
primaryButton: .default(Text(info.primaryButton.title)) {
|
||||
info.primaryButton.action?()
|
||||
},
|
||||
secondaryButton: .default(Text(secondaryButton.title)) {
|
||||
secondaryButton.action?()
|
||||
})
|
||||
} else {
|
||||
return Alert(title: Text(info.title),
|
||||
message: info.messageText,
|
||||
dismissButton: .default(Text(info.primaryButton.title)) {
|
||||
info.primaryButton.action?()
|
||||
})
|
||||
}
|
||||
info.alert
|
||||
}
|
||||
}
|
||||
.accentColor(theme.colors.accent)
|
||||
|
||||
Reference in New Issue
Block a user