merged element 1.8.10

This commit is contained in:
Arnfried Griesert
2022-05-03 12:48:01 +02:00
1235 changed files with 50869 additions and 23132 deletions
@@ -65,15 +65,15 @@ class TimelinePollViewModel: TimelinePollViewModelType, TimelinePollViewModelPro
}
func showAnsweringFailure() {
state.bindings.alertInfo = TimelinePollErrorAlertInfo(id: .failedSubmittingAnswer,
title: VectorL10n.pollTimelineVoteNotRegisteredTitle,
subtitle: VectorL10n.pollTimelineVoteNotRegisteredSubtitle)
state.bindings.alertInfo = AlertInfo(id: .failedSubmittingAnswer,
title: VectorL10n.pollTimelineVoteNotRegisteredTitle,
message: VectorL10n.pollTimelineVoteNotRegisteredSubtitle)
}
func showClosingFailure() {
state.bindings.alertInfo = TimelinePollErrorAlertInfo(id: .failedClosingPoll,
title: VectorL10n.pollTimelineNotClosedTitle,
subtitle: VectorL10n.pollTimelineNotClosedSubtitle)
state.bindings.alertInfo = AlertInfo(id: .failedClosingPoll,
title: VectorL10n.pollTimelineNotClosedTitle,
message: VectorL10n.pollTimelineNotClosedSubtitle)
}
// MARK: - Private
@@ -82,7 +82,6 @@ class TimelinePollViewModel: TimelinePollViewModelType, TimelinePollViewModelPro
state.poll.answerOptions.updateEach { answerOption in
if answerOption.selected {
answerOption.selected = false
answerOption.count = UInt(max(0, Int(answerOption.count) - 1))
state.poll.totalAnswerCount = UInt(max(0, Int(state.poll.totalAnswerCount) - 1))
}