mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add max selections support for polls (#5726)
This commit is contained in:
committed by
GitHub
parent
173a927bf8
commit
30e4e6339d
@@ -176,17 +176,17 @@ struct TimelineControllerMockConfiguration {
|
||||
return .success(())
|
||||
}
|
||||
|
||||
createPollQuestionAnswersPollKindClosure = { [weak self, timelineProxy] question, answers, pollKind in
|
||||
createPollQuestionAnswersMaxSelectionsPollKindClosure = { [weak self, timelineProxy] question, answers, maxSelections, pollKind in
|
||||
self?.callbacks.send(.messageSentOrEdited)
|
||||
if let timelineProxy {
|
||||
_ = await timelineProxy.createPoll(question: question, answers: answers, pollKind: pollKind)
|
||||
_ = await timelineProxy.createPoll(question: question, answers: answers, maxSelections: maxSelections, pollKind: pollKind)
|
||||
}
|
||||
return .success(())
|
||||
}
|
||||
|
||||
editPollOriginalQuestionAnswersPollKindClosure = { [timelineProxy] eventID, question, answers, pollKind in
|
||||
editPollOriginalQuestionAnswersMaxSelectionsPollKindClosure = { [timelineProxy] eventID, question, answers, maxSelections, pollKind in
|
||||
if let timelineProxy {
|
||||
_ = await timelineProxy.editPoll(original: eventID, question: question, answers: answers, pollKind: pollKind)
|
||||
_ = await timelineProxy.editPoll(original: eventID, question: question, answers: answers, maxSelections: maxSelections, pollKind: pollKind)
|
||||
}
|
||||
return .success(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user