From 67556262590a45ef8432b1297dab371cc3f56946 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 17 Aug 2023 14:08:26 +0800 Subject: [PATCH] Show votes count in translated text --- src/components/status.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/status.jsx b/src/components/status.jsx index 74c1651b..ea0485f6 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -1169,7 +1169,16 @@ function Status({ getHTMLText(content) + (poll?.options?.length ? `\n\nPoll:\n${poll.options - .map((option) => `- ${option.title}`) + .map( + (option) => + `- ${option.title}${ + option.votesCount >= 0 + ? ` (${option.votesCount} vote${ + option.votesCount !== 1 ? 's' : '' + })` + : '' + }`, + ) .join('\n')}` : '') }