Skip to content

Commit 4cc9f1f

Browse files
committed
update display of times in messages composer
1 parent 9ebc347 commit 4cc9f1f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/packages/frontend/messages/compose.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { isEqual } from "lodash";
1111
import { useRef, useState } from "react";
1212
import { FormattedMessage, useIntl } from "react-intl";
1313
import { useAsyncEffect } from "use-async-effect";
14-
1514
import {
1615
redux,
1716
useActions,
@@ -64,8 +63,14 @@ export default function Compose({
6463
const [version, setVersion] = useState<number>(0);
6564
const [versions, setVersions] = useState<Date[]>([]);
6665
const renderSliderTooltip = (index) => {
67-
const date = versions[index];
68-
if (date == null) return;
66+
const logicalTime = versions[index];
67+
if (logicalTime == null) {
68+
return;
69+
}
70+
const date = syncstringRef.current?.wallTime(logicalTime);
71+
if (date == null) {
72+
return;
73+
}
6974
return <TimeAgo date={date} />;
7075
};
7176
const getValueRef = useRef<any>(null);

0 commit comments

Comments
 (0)