From 68b69130ddd9eb136a61656db7ec50b16039b247 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 13 Feb 2024 11:38:47 +1100 Subject: [PATCH] fix: make the ctx menu for disappearing message dynamic with 59m --- .../message/message-content/MessageReactBar.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/components/conversation/message/message-content/MessageReactBar.tsx b/ts/components/conversation/message/message-content/MessageReactBar.tsx index dbd5a2bd6..c4f0e1be2 100644 --- a/ts/components/conversation/message/message-content/MessageReactBar.tsx +++ b/ts/components/conversation/message/message-content/MessageReactBar.tsx @@ -142,10 +142,10 @@ const ExpiresInItem = ({ expirationTimestamp }: { expirationTimestamp?: number | () => { setRefresh(!refresh); }, - // We want to force refresh this component a lot more if the message has more than 2 minutes before disappearing, - // because when that's the case we also display the seconds left (i.e. 1min 23s) and we want that 23s to be dynamic. + // We want to force refresh this component a lot more if the message has less than 1h before disappearing, + // because when that's the case we also display the seconds left (i.e. 59min 23s) and we want that 23s to be dynamic. // Also, we use a refresh interval of 500 rather than 1s so that the counter is a bit smoother - timeLeftMs > 0 && timeLeftMs <= 2 * DURATION.MINUTES ? 500 : null + timeLeftMs > 0 && timeLeftMs <= 1 * DURATION.HOURS ? 500 : null ); if (!expirationTimestamp || timeLeftMs < 0) { return null;