{poll.terminatedAt != null && weVotedForThis && (
diff --git a/ts/components/conversation/poll-message/PollVotesModal.dom.tsx b/ts/components/conversation/poll-message/PollVotesModal.dom.tsx
index 25363fe345..0f84a04890 100644
--- a/ts/components/conversation/poll-message/PollVotesModal.dom.tsx
+++ b/ts/components/conversation/poll-message/PollVotesModal.dom.tsx
@@ -1,12 +1,14 @@
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
-import React from 'react';
+import React, { useMemo } from 'react';
import { tw } from '../../../axo/tw.dom.js';
import { AxoButton } from '../../../axo/AxoButton.dom.js';
+import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js';
import { Modal } from '../../Modal.dom.js';
import { Avatar, AvatarSize } from '../../Avatar.dom.js';
import { ContactName } from '../ContactName.dom.js';
+import { UserText } from '../../UserText.dom.js';
import type { LocalizerType } from '../../../types/Util.std.js';
import type {
PollVoteWithUserType,
@@ -30,6 +32,12 @@ export function PollVotesModal({
canEndPoll,
messageId,
}: PollVotesModalProps): JSX.Element {
+ const maxVoteCount = useMemo(() => {
+ return poll.votesByOption.values().reduce((max, voters) => {
+ return Math.max(max, voters.length);
+ }, 0);
+ }, [poll.votesByOption]);
+
return (
- {poll.question}
+
+
+
{poll.options.map((option, index, array) => {
const voters = poll.votesByOption.get(index) || [];
const optionKey = `option-${index}`;
const isLastOption = index === array.length - 1;
+ const isWinning = voters.length > 0 && voters.length === maxVoteCount;
return (