mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
* Fixes #2609 - Add trophy icon next to the winning poll option * Address PR comments
This commit is contained in:
@@ -43,6 +43,7 @@ internal enum Asset {
|
||||
internal static let mediaPause = ImageAsset(name: "images/media-pause")
|
||||
internal static let mediaPlay = ImageAsset(name: "images/media-play")
|
||||
internal static let notificationsPromptGraphic = ImageAsset(name: "images/notifications-prompt-graphic")
|
||||
internal static let pollWinner = ImageAsset(name: "images/poll-winner")
|
||||
internal static let waitingGradient = ImageAsset(name: "images/waiting-gradient")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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