mirror of
https://github.com/mjl-/mox.git
synced 2025-01-27 14:55:56 +03:00
webmail: don't who an age of "-<1min", drop the -
if a browser is ahead just a few seconds, we would show "-<1min", not great. just show "<1min" in that case. we'll still show negative age if drift is more than 1 minute, which seems like a good hint to get time fixed on either client or server.
This commit is contained in:
parent
ed8938c113
commit
9cf8ee2162
2 changed files with 4 additions and 0 deletions
|
@ -2648,6 +2648,8 @@ const newMsgitemView = (mi, msglistView, otherMailbox, listMailboxes, receivedTi
|
|||
if (t < 60) {
|
||||
s = '<1min';
|
||||
nextSecs = 60 - t;
|
||||
// Prevent showing '-<1min' when browser and server have relatively small time drift of max 1 minute.
|
||||
negative = '';
|
||||
}
|
||||
dom._kids(r, negative + s);
|
||||
// note: Cannot have delays longer than 24.8 days due to storage as 32 bit in
|
||||
|
|
|
@ -1939,6 +1939,8 @@ const newMsgitemView = (mi: api.MessageItem, msglistView: MsglistView, otherMail
|
|||
if (t < 60) {
|
||||
s = '<1min'
|
||||
nextSecs = 60-t
|
||||
// Prevent showing '-<1min' when browser and server have relatively small time drift of max 1 minute.
|
||||
negative = ''
|
||||
}
|
||||
|
||||
dom._kids(r, negative+s)
|
||||
|
|
Loading…
Reference in a new issue