From c91f4f8ab12c07db0ddac1de5dfda12961cf95ba Mon Sep 17 00:00:00 2001 From: Florian Orben Date: Wed, 28 Oct 2015 01:19:15 +0100 Subject: Dont display '1 minute ago' timestamps for post posted < than 1 minute ago --- web/react/utils/utils.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'web/react/utils') 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) { -- cgit v1.2.3-1-g7c22