From df2d409fc1f96cffa737462eb1da1489de6ae7a9 Mon Sep 17 00:00:00 2001 From: Frank Rotermund Date: Wed, 14 Jun 2023 07:45:18 +0200 Subject: [PATCH] MESSENGER-4383 fix for undisclosed button visibility and small UI fixes --- .../Modules/Room/TimelinePoll/View/TimelinePollView.swift | 3 ++- bwi/PollParticipantDetails/PollParticipantDetailsView.swift | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RiotSwiftUI/Modules/Room/TimelinePoll/View/TimelinePollView.swift b/RiotSwiftUI/Modules/Room/TimelinePoll/View/TimelinePollView.swift index db37651bb..dd69cc961 100644 --- a/RiotSwiftUI/Modules/Room/TimelinePoll/View/TimelinePollView.swift +++ b/RiotSwiftUI/Modules/Room/TimelinePoll/View/TimelinePollView.swift @@ -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) }) diff --git a/bwi/PollParticipantDetails/PollParticipantDetailsView.swift b/bwi/PollParticipantDetails/PollParticipantDetailsView.swift index 70bc5372f..7b9bb6c4a 100644 --- a/bwi/PollParticipantDetails/PollParticipantDetailsView.swift +++ b/bwi/PollParticipantDetails/PollParticipantDetailsView.swift @@ -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) } }