mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-13 03:09:58 +02:00
MESSENGER-4929 show participant votes button when user has voted
This commit is contained in:
@@ -100,6 +100,10 @@ struct TimelinePollDetails {
|
||||
var representsPollEndedEvent: Bool {
|
||||
eventType == .ended
|
||||
}
|
||||
|
||||
var shouldShowShowParticipantsButton: Bool {
|
||||
return (showParticipants && hasCurrentUserVoted && (type == TimelinePollType.disclosed || closed))
|
||||
}
|
||||
}
|
||||
|
||||
extension TimelinePollDetails: Identifiable { }
|
||||
|
||||
@@ -74,8 +74,7 @@ struct TimelinePollView: View {
|
||||
.font(theme.fonts.footnote)
|
||||
.foregroundColor(theme.colors.tertiaryContent)
|
||||
|
||||
if poll.showParticipants &&
|
||||
(poll.type == TimelinePollType.disclosed || poll.closed) {
|
||||
if poll.shouldShowShowParticipantsButton {
|
||||
Button(action: {
|
||||
viewModel.send(viewAction:.showParticipants)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user