Removing redundant init

This commit is contained in:
Alfonso Grillo
2023-01-24 09:31:12 +01:00
parent 78c0744f0a
commit 9f28fdc382
@@ -71,33 +71,9 @@ struct TimelinePollDetails {
var type: TimelinePollType
var eventType: TimelinePollEventType
var maxAllowedSelections: UInt
var hasBeenEdited = true
var hasBeenEdited: Bool
var hasDecryptionError: Bool
init(id: String,
question: String,
answerOptions: [TimelinePollAnswerOption],
closed: Bool,
startDate: Date,
totalAnswerCount: UInt,
type: TimelinePollType,
eventType: TimelinePollEventType,
maxAllowedSelections: UInt,
hasBeenEdited: Bool,
hasDecryptionError: Bool) {
self.id = id
self.question = question
self.answerOptions = answerOptions
self.closed = closed
self.startDate = startDate
self.totalAnswerCount = totalAnswerCount
self.type = type
self.eventType = eventType
self.maxAllowedSelections = maxAllowedSelections
self.hasBeenEdited = hasBeenEdited
self.hasDecryptionError = hasDecryptionError
}
var hasCurrentUserVoted: Bool {
answerOptions.contains(where: \.selected)
}