mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
Add results view
This commit is contained in:
@@ -52,7 +52,10 @@ struct PollListItem: View {
|
||||
}
|
||||
|
||||
if pollData.winningOption != nil {
|
||||
optionView(winningOption: pollData.winningOption!)
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
optionView(winningOption: pollData.winningOption!)
|
||||
resultView
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,6 +99,14 @@ struct PollListItem: View {
|
||||
Image(uiImage: Asset.Images.pollWinnerIcon.image)
|
||||
}
|
||||
}
|
||||
|
||||
private var resultView: some View {
|
||||
let text = pollData.numberOfVotes == 1 ? VectorL10n.pollTimelineTotalFinalResultsOneVote : VectorL10n.pollTimelineTotalFinalResults(Int(pollData.numberOfVotes))
|
||||
|
||||
return Text(text)
|
||||
.font(theme.fonts.footnote)
|
||||
.foregroundColor(theme.colors.tertiaryContent)
|
||||
}
|
||||
}
|
||||
|
||||
private extension PollListData {
|
||||
|
||||
Reference in New Issue
Block a user