Message sent time is not updated immediately in ChatList screen (#7768)

This commit is contained in:
Naresh Rawat
2026-06-02 17:10:37 +05:45
committed by GitHub
parent 771fd5ddf6
commit cbf8e95bdb
+4 -1
View File
@@ -22,8 +22,11 @@ export function TimeElapsed({
)
const [prevTick, setPrevTick] = useState(tick)
if (prevTick !== tick) {
const [prevTimestamp, setPrevTimestamp] = useState(timestamp)
if (prevTick !== tick || prevTimestamp !== timestamp) {
setPrevTick(tick)
setPrevTimestamp(timestamp)
setTimeAgo(
timeToString ? timeToString(i18n, timestamp) : ago(timestamp, tick),
)