aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-08-22 11:46:52 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-08-22 11:46:52 +0200
commite2cc37b07137879fe9ba1dcf7bb5f05ab5e41bfc (patch)
treebc8f0aae1ed21f470e6c451c1b9a5b4c02bdbece /lisp/mastodon-tl.el
parent2275eb8eba8b5c7099e2c45962e20c8c6aa1006c (diff)
just "just now" for < 1 min rel ts
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index b3f0506..5827886 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -837,7 +837,8 @@ TIMESTAMP is assumed to be in the past."
(let* ((time-difference (time-subtract current-time timestamp))
(seconds-difference (float-time time-difference))
(tmp (mastodon-tl--human-duration (max 0 seconds-difference))))
- (cons (concat (car tmp) " ago")
+ ;; revert to old just now style for < 1 min
+ (cons (concat (car tmp) (if (string= "just now" (car tmp)) "" " ago"))
(time-add current-time (cdr tmp)))))
(defun mastodon-tl--relative-time-description (timestamp &optional current-time)
@@ -1337,8 +1338,10 @@ displayed when the duration is smaller than a minute)."
(if n2 (setq n2 (truncate n2)))
(cond
((null n2)
- (cons (format "%d %s%s" n1 unit1 (if (> n1 1) "s" ""))
- (max resolution res1)))
+ ;; revert to old just now style for < 1 min:
+ (cons "just now" 60))
+ ;; (cons (format "%d %s%s" n1 unit1 (if (> n1 1) "s" ""))
+ ;; (max resolution res1)))
((< (* res2 n2) resolution)
(cons (format "%d %s%s" n1 unit1 (if (> n1 1) "s" ""))
(max resolution res2)))