From 191d6b071c6f7ec3e9834da2847a553c21dc8b0e Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 12 Nov 2025 16:32:55 +0100 Subject: [PATCH] [Glitch] Revert "Ensure the boost button shows a numeric value (#36805)" Port 8abec0ffcb7feb45017293c5ca0031a77f36d3b8 to glitch-soc Signed-off-by: Claire --- .../glitch/components/status/boost_button.tsx | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/app/javascript/flavours/glitch/components/status/boost_button.tsx b/app/javascript/flavours/glitch/components/status/boost_button.tsx index 110bc956d7..615e716646 100644 --- a/app/javascript/flavours/glitch/components/status/boost_button.tsx +++ b/app/javascript/flavours/glitch/components/status/boost_button.tsx @@ -112,18 +112,6 @@ const BoostOrQuoteMenu: FC = ({ status, counters }) => { const statusId = status.get('id') as string; const wasBoosted = !!status.get('reblogged'); - let count: number | undefined; - if (counters) { - count = 0; - // Ensure count is a valid integer. - if (Number.isInteger(status.get('reblogs_count'))) { - count += status.get('reblogs_count') as number; - } - if (Number.isInteger(status.get('quotes_count'))) { - count += status.get('quotes_count') as number; - } - } - const showLoginPrompt = useCallback(() => { dispatch( openModal({ @@ -199,7 +187,12 @@ const BoostOrQuoteMenu: FC = ({ status, counters }) => { )} icon='retweet' iconComponent={boostIcon} - counter={count} + counter={ + counters + ? (status.get('reblogs_count') as number) + + (status.get('quotes_count') as number) + : undefined + } active={isReblogged} />