local echo: Fix tooltip over locally echoed spinner.

Despite the timestamp being hidden while sending the message, the link
on the timestamp (message url) was still hoverable and clickable, and
had a tooltip.

Here we disable the tooltip, but
https://github.com/zulip/zulip/issues/25069 remains open for the link
part.
This commit is contained in:
Lakshay Mittal 2023-03-30 15:21:39 +05:30 committed by Tim Abbott
parent e86fe4e57c
commit 4478f8cc55
1 changed files with 5 additions and 0 deletions

View File

@ -220,8 +220,13 @@ export function initialize() {
const $time_elem = $(instance.reference);
const $row = $time_elem.closest(".message_row");
const message = message_lists.current.get(rows.id($row));
// Don't show time tooltip for locally echoed message.
if (message.locally_echoed) {
return false;
}
const time = new Date(message.timestamp * 1000);
instance.setContent(timerender.get_full_datetime(time));
return true;
},
onHidden(instance) {
instance.destroy();