Add max selections support for polls (#5726)

This commit is contained in:
svetoslav-sportinno
2026-06-22 14:39:12 +03:00
committed by GitHub
parent 173a927bf8
commit 30e4e6339d
49 changed files with 506 additions and 251 deletions
+2 -1
View File
@@ -11,13 +11,14 @@ import Foundation
extension Poll {
static func mock(question: String,
pollKind: Poll.Kind = .disclosed,
maxSelections: Int = 1,
options: [Poll.Option],
votes: [String: [String]] = [:],
ended: Bool = false,
createdByAccountOwner: Bool = false) -> Self {
.init(question: question,
kind: pollKind,
maxSelections: 1,
maxSelections: maxSelections,
options: options,
votes: votes,
endDate: ended ? Date() : nil,