mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
recent_topics: Standardize format of last message time.
We follow how other apps present older messages, e.g. Gmail, Facebook Messenger, etc. display it. Specifically, the logic we use is: If the time is <24hr ago, show an absolute time, like "21:30" (or "9:30pm"). Otherwise, show what day it was, and not a time If the day was yesterday, say "Yesterday". Otherwise, if it was <7 days ago, say the day of week, like "Friday". Otherwise, if it was <1 year ago, say the month and day, like "Sep 6". Otherwise, say the year, month, and day, like "Sep 9, 2020". With some tweaks from Tim Abbott to better handle the future case. Fixes #19775
This commit is contained in:
@@ -253,7 +253,7 @@ function format_topic(topic_data) {
|
||||
}
|
||||
const topic = last_msg.topic;
|
||||
const time = new Date(last_msg.timestamp * 1000);
|
||||
const last_msg_time = timerender.last_seen_status_from_date(time);
|
||||
const last_msg_time = timerender.format_time_modern(time);
|
||||
const full_datetime = timerender.get_full_datetime(time);
|
||||
|
||||
// We hide the row according to filters or if it's muted.
|
||||
|
||||
Reference in New Issue
Block a user