timestamp_tooltip: Reformat tooltip content.

Reformats to a format like: 5/19/17, 2:42:53 AM IST (UTC+5.5).
This commit is contained in:
Dinesh
2021-06-27 22:46:36 +05:30
committed by Tim Abbott
parent a37346c128
commit d779a1cf2f
3 changed files with 32 additions and 38 deletions

View File

@@ -154,7 +154,6 @@ export function initialize() {
delegate("body", {
target: ".message_time",
allowHTML: true,
placement: "top",
appendTo: () => document.body,
onShow(instance) {
@@ -162,8 +161,7 @@ export function initialize() {
const row = time_elem.closest(".message_row");
const message = message_lists.current.get(rows.id(row));
const time = new Date(message.timestamp * 1000);
const full_datetime = timerender.get_full_datetime(time);
instance.setContent(full_datetime.date + "<br/>" + full_datetime.time);
instance.setContent(timerender.get_full_datetime(time));
},
onHidden(instance) {
instance.destroy();