Merge branch 'feature/4483_poll_details_fixes' into 'develop'

MESSENGER-4383 fix for undisclosed button visibility and small UI fixes

See merge request bwmessenger/bundesmessenger/bundesmessenger-ios!142
This commit is contained in:
Frank Rotermund
2023-06-14 05:47:10 +00:00
2 changed files with 5 additions and 3 deletions
@@ -74,7 +74,8 @@ struct TimelinePollView: View {
.font(theme.fonts.footnote)
.foregroundColor(theme.colors.tertiaryContent)
if poll.showParticipants && (poll.type == .undisclosed || poll.closed) {
if poll.showParticipants &&
(poll.type == TimelinePollType.disclosed || poll.closed) {
Button(action: {
viewModel.send(viewAction:.showParticipants)
})
@@ -33,6 +33,7 @@ struct PollParticipantDetailsView: View {
NavigationView {
VStack {
PollParticipantPollHeaderView(poll: viewModel.viewState.poll)
.padding(.top, 10)
List {
ForEach(Array(viewModel.viewState.answers.enumerated()), id: \.offset) { index, answer in
@@ -46,7 +47,7 @@ struct PollParticipantDetailsView: View {
if answer.votes > answer.visibleVotes && !answer.expanded {
Button(action: { onExpandButton(index: index) }) {
Text(BWIL10n.pollParticipantDetailsShowMore(Int(answer.votes-answer.visibleVotes)))
}
}
}
}
}
@@ -96,7 +97,7 @@ struct PollParticipantPollHeaderView: View {
var body: some View {
Text(poll.name)
.font(theme.fonts.headline)
.font(theme.fonts.title3)
.foregroundColor(theme.colors.primaryContent)
}
}