Customize TimePollView for poll.end events

This commit is contained in:
Alfonso Grillo
2022-12-28 16:35:49 +01:00
parent 39bb927fd5
commit 6b477c764c
7 changed files with 28 additions and 0 deletions
@@ -151,6 +151,7 @@ struct TimelinePollAnswerOptionButton_Previews: PreviewProvider {
closed: closed,
totalAnswerCount: 100,
type: type,
eventType: .started,
maxAllowedSelections: 1,
hasBeenEdited: false,
hasDecryptionError: false)
@@ -31,6 +31,12 @@ struct TimelinePollView: View {
let poll = viewModel.viewState.poll
VStack(alignment: .leading, spacing: 16.0) {
if poll.representsPollEndedEvent {
Text(VectorL10n.pollTimelineEndedText)
.font(theme.fonts.footnote)
.foregroundColor(theme.colors.tertiaryContent)
}
Text(poll.question)
.font(theme.fonts.bodySB)
.foregroundColor(theme.colors.primaryContent) +