mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
* Fixes #2609 - Add trophy icon next to the winning poll option * Address PR comments
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Compound
|
||||
import SwiftUI
|
||||
|
||||
struct PollOptionView: View {
|
||||
@@ -39,9 +40,20 @@ struct PollOptionView: View {
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
if showVotes {
|
||||
Text(L10n.commonPollVotesCount(pollOption.votes))
|
||||
.font(isFinalWinningOption ? .compound.bodySMSemibold : .compound.bodySM)
|
||||
.foregroundColor(isFinalWinningOption ? .compound.textPrimary : .compound.textSecondary)
|
||||
if isFinalWinningOption {
|
||||
HStack(spacing: 4) {
|
||||
CompoundIcon(asset: Asset.Images.pollWinner)
|
||||
.foregroundColor(.compound.iconAccentTertiary)
|
||||
|
||||
Text(L10n.commonPollVotesCount(pollOption.votes))
|
||||
.font(.compound.bodySMSemibold)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
}
|
||||
} else {
|
||||
Text(L10n.commonPollVotesCount(pollOption.votes))
|
||||
.font(.compound.bodySM)
|
||||
.foregroundColor(.compound.textSecondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user