vector-im/element-ios/issues/5114 - De-labs-ed polls, disabled editing and undisclosed polls until platform parity.

This commit is contained in:
Stefan Ceriu
2022-01-18 14:17:58 +02:00
committed by Stefan Ceriu
parent df010595dc
commit 9ddf80f54b
6 changed files with 12 additions and 33 deletions
@@ -113,10 +113,10 @@ class PollEditFormViewModel: PollEditFormViewModelType {
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)
return text.isEmpty ? nil : text
}))
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
}))
}
}
@@ -35,7 +35,8 @@ struct PollEditForm: View {
ScrollView {
VStack(alignment: .leading, spacing: 32.0) {
PollEditFormTypePicker(selectedType: $viewModel.type)
// Intentionally disabled until platform parity.
// PollEditFormTypePicker(selectedType: $viewModel.type)
VStack(alignment: .leading, spacing: 16.0) {
Text(VectorL10n.pollEditFormPollQuestionOrTopic)