vector-im/element-ios/issues/5114 - Various tweaks following PR review.

This commit is contained in:
Stefan Ceriu
2022-01-14 17:02:04 +02:00
committed by Stefan Ceriu
parent bf6ef2bce2
commit d7e9fe61b4
14 changed files with 102 additions and 102 deletions
@@ -19,7 +19,7 @@ import Combine
struct PollEditFormViewModelParameters {
let mode: PollEditFormMode
let pollDetails: PollDetails
let pollDetails: EditFormPollDetails
}
@available(iOS 14, *)
@@ -97,7 +97,7 @@ class PollEditFormViewModel: PollEditFormViewModelType {
title: VectorL10n.pollEditFormPostFailureTitle,
subtitle: VectorL10n.pollEditFormPostFailureSubtitle)
case .failedUpdatingPoll:
state.bindings.alertInfo = PollEditFormErrorAlertInfo(id: .failedCreatingPoll,
state.bindings.alertInfo = PollEditFormErrorAlertInfo(id: .failedUpdatingPoll,
title: VectorL10n.pollEditFormUpdateFailureTitle,
subtitle: VectorL10n.pollEditFormUpdateFailureSubtitle)
case .none:
@@ -109,8 +109,8 @@ class PollEditFormViewModel: PollEditFormViewModelType {
// MARK: - Private
private func buildPollDetails() -> PollDetails {
return PollDetails(type: state.bindings.type,
private func buildPollDetails() -> EditFormPollDetails {
return EditFormPollDetails(type: state.bindings.type,
question: state.bindings.question.text.trimmingCharacters(in: .whitespacesAndNewlines),
answerOptions: state.bindings.answerOptions.compactMap({ answerOption in
let text = answerOption.text.trimmingCharacters(in: .whitespacesAndNewlines)