mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-05 07:27:42 +02:00
Add alert property to ErrorAlertInfo.
This commit is contained in:
@@ -64,13 +64,13 @@ class TimelinePollViewModel: TimelinePollViewModelType, TimelinePollViewModelPro
|
||||
}
|
||||
|
||||
func showAnsweringFailure() {
|
||||
state.bindings.alertInfo = ErrorAlertInfo(id: TimelinePollAlertType.failedSubmittingAnswer,
|
||||
state.bindings.alertInfo = ErrorAlertInfo(id: .failedSubmittingAnswer,
|
||||
title: VectorL10n.pollTimelineVoteNotRegisteredTitle,
|
||||
message: VectorL10n.pollTimelineVoteNotRegisteredSubtitle)
|
||||
}
|
||||
|
||||
func showClosingFailure() {
|
||||
state.bindings.alertInfo = ErrorAlertInfo(id: TimelinePollAlertType.failedClosingPoll,
|
||||
state.bindings.alertInfo = ErrorAlertInfo(id: .failedClosingPoll,
|
||||
title: VectorL10n.pollTimelineNotClosedTitle,
|
||||
message: VectorL10n.pollTimelineNotClosedSubtitle)
|
||||
}
|
||||
|
||||
@@ -58,9 +58,7 @@ struct TimelinePollView: View {
|
||||
.padding([.horizontal, .top], 2.0)
|
||||
.padding([.bottom])
|
||||
.alert(item: $viewModel.alertInfo) { info in
|
||||
Alert(title: Text(info.title),
|
||||
message: info.messageText,
|
||||
dismissButton: .default(Text(VectorL10n.ok)))
|
||||
info.alert
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user