Skip to content

Commit

Permalink
/issues/5114 - Fix SwiftUI not allowing multiple alerts on the same v…
Browse files Browse the repository at this point in the history
…iew prior to iOS 15.
  • Loading branch information
stefanceriu committed Dec 8, 2021
1 parent 46ca843 commit 0bbe96a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions RiotSwiftUI/Modules/Room/PollTimeline/View/PollTimelineView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ struct PollTimelineView: View {
viewModel.send(viewAction: .selectAnswerOptionWithIdentifier(answerOption.id))
}
}
.alert(isPresented: $viewModel.showsClosingFailureAlert) {
Alert(title: Text(VectorL10n.pollTimelineNotClosedTitle),
message: Text(VectorL10n.pollTimelineNotClosedSubtitle),
dismissButton: .default(Text(VectorL10n.pollTimelineNotClosedAction)))
}
}
.disabled(poll.closed)
.fixedSize(horizontal: false, vertical: true)
.alert(isPresented: $viewModel.showsAnsweringFailureAlert) {
Alert(title: Text(VectorL10n.pollTimelineNotClosedTitle),
message: Text(VectorL10n.pollTimelineNotClosedSubtitle),
dismissButton: .default(Text(VectorL10n.pollTimelineNotClosedAction)))
}
.alert(isPresented: $viewModel.showsClosingFailureAlert) {
Alert(title: Text(VectorL10n.pollTimelineVoteNotRegisteredTitle),
message: Text(VectorL10n.pollTimelineVoteNotRegisteredSubtitle),
dismissButton: .default(Text(VectorL10n.pollTimelineVoteNotRegisteredAction)))
}

Text(totalVotesString)
.font(theme.fonts.footnote)
.foregroundColor(theme.colors.tertiaryContent)
.alert(isPresented: $viewModel.showsAnsweringFailureAlert) {
Alert(title: Text(VectorL10n.pollTimelineVoteNotRegisteredTitle),
message: Text(VectorL10n.pollTimelineVoteNotRegisteredSubtitle),
dismissButton: .default(Text(VectorL10n.pollTimelineVoteNotRegisteredAction)))
}
}
.padding([.horizontal, .top], 2.0)
.padding([.bottom])
Expand Down

0 comments on commit 0bbe96a

Please sign in to comment.