Merge branch 'develop' into flescio/1040-poll_detail

# Conflicts:
#	Riot/Assets/en.lproj/Vector.strings
#	Riot/Generated/Strings.swift
This commit is contained in:
Flavio Alescio
2023-01-25 15:49:40 +01:00
95 changed files with 714 additions and 957 deletions
@@ -139,17 +139,21 @@ extension TimelinePollDetails {
closed: poll.isClosed,
startDate: poll.startDate,
totalAnswerCount: poll.totalAnswerCount,
type: Self.pollKindToTimelinePollType(poll.kind),
type: poll.kind.timelinePollType,
eventType: eventType,
maxAllowedSelections: poll.maxAllowedSelections,
hasBeenEdited: poll.hasBeenEdited,
hasDecryptionError: poll.hasDecryptionError)
}
private static func pollKindToTimelinePollType(_ kind: PollKind) -> TimelinePollType {
let mapping = [PollKind.disclosed: TimelinePollType.disclosed,
PollKind.undisclosed: TimelinePollType.undisclosed]
return mapping[kind] ?? .disclosed
}
private extension PollKind {
var timelinePollType: TimelinePollType {
switch self {
case .disclosed:
return .disclosed
case .undisclosed:
return .undisclosed
}
}
}