mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Feature/4393 poll with visible participant p1
This commit is contained in:
committed by
JanNiklas Grabowski
parent
b76b4e0803
commit
902b529245
@@ -50,7 +50,8 @@ class PollEditFormViewModel: PollEditFormViewModelType, PollEditFormViewModelPro
|
||||
bindings: PollEditFormViewStateBindings(
|
||||
question: PollEditFormQuestion(text: parameters.pollDetails.question, maxLength: Constants.maxQuestionLength),
|
||||
answerOptions: parameters.pollDetails.answerOptions.map { PollEditFormAnswerOption(text: $0, maxLength: Constants.maxAnswerOptionLength) },
|
||||
type: parameters.pollDetails.type
|
||||
type: parameters.pollDetails.type,
|
||||
showParticipants: parameters.pollDetails.showParticipants
|
||||
)
|
||||
)
|
||||
|
||||
@@ -100,11 +101,13 @@ class PollEditFormViewModel: PollEditFormViewModelType, PollEditFormViewModelPro
|
||||
// MARK: - Private
|
||||
|
||||
private func buildPollDetails() -> EditFormPollDetails {
|
||||
|
||||
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)
|
||||
return text.isEmpty ? nil : text
|
||||
})
|
||||
},
|
||||
showParticipants: state.bindings.showParticipants)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user