diff options
author | Florian Orben <florian.orben@gmail.com> | 2015-10-28 01:19:15 +0100 |
---|---|---|
committer | Florian Orben <florian.orben@gmail.com> | 2015-10-28 01:19:57 +0100 |
commit | c91f4f8ab12c07db0ddac1de5dfda12961cf95ba (patch) | |
tree | 3a7d5dfdbd58fb5ea6344f05b833b0da459c0d6f /web/react/utils | |
parent | ede80afe4cce19b4c561f028220ccc21f2581605 (diff) | |
download | chat-c91f4f8ab12c07db0ddac1de5dfda12961cf95ba.tar.gz chat-c91f4f8ab12c07db0ddac1de5dfda12961cf95ba.tar.bz2 chat-c91f4f8ab12c07db0ddac1de5dfda12961cf95ba.zip |
Dont display '1 minute ago' timestamps for post posted < than 1 minute ago
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/utils.jsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index fadab27a7..3140a5d77 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -211,11 +211,15 @@ export function displayDateTime(ticks) { } interval = Math.floor(seconds / 60); - if (interval > 1) { + if (interval >= 2) { return interval + ' minutes ago'; } - return '1 minute ago'; + if (interval >= 1) { + return '1 minute ago'; + } + + return 'just now'; } export function displayCommentDateTime(ticks) { |