Message sent time is not updated immediately in ChatList screen (#7768)
This commit is contained in:
@@ -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),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user