recent_topics_timestamp: Fix tooltip.

d779a1c tweaked `get_full_datetime` to return a string instead
of a {date, time} object. This function is used for recent topics
too but wasn't fixed to use the string.

This resulted in showing 'undefined undefined' in tooltip.
This commit is contained in:
Dinesh
2021-07-03 12:23:32 +05:30
committed by Steve Howell
parent c4345429a6
commit ef5abb3f33
2 changed files with 3 additions and 6 deletions

View File

@@ -116,10 +116,7 @@ mock_esm("../../static/js/stream_list", {
mock_esm("../../static/js/timerender", {
last_seen_status_from_date: () => "Just now",
get_full_datetime: () => ({
date: "date",
time: "time",
}),
get_full_datetime: () => "date at time",
});
mock_esm("../../static/js/sub_store", {
get: (stream) => {
@@ -292,7 +289,7 @@ function generate_topic_data(topic_info_array) {
invite_only: false,
is_web_public: true,
last_msg_time: "Just now",
full_last_msg_date_time: "date time",
full_last_msg_date_time: "date at time",
senders: [1, 2],
stream: "stream" + stream_id,
stream_color: "",

View File

@@ -278,7 +278,7 @@ function format_topic(topic_data) {
muted,
topic_muted,
participated: topic_data.participated,
full_last_msg_date_time: full_datetime.date + " " + full_datetime.time,
full_last_msg_date_time: full_datetime,
};
}