Fix: (ement-room-list--entry) Workaround bug in ts

ts-human-format-duration returned empty string for durations <1
second.  ts-0.2.1 contains the fix, and 0.3-pre does too, but users
will need to upgrade the library, so we tell them.
This commit is contained in:
Adam Porter 2021-07-29 21:02:48 -05:00
parent 215a334468
commit 2703f5c0ef
2 changed files with 5 additions and 3 deletions

View file

@ -233,8 +233,10 @@ To be called in `ement-sync-callback-hook'."
t))
(e-latest (progn
(when (string-empty-p formatted-timestamp)
(message "(ement-room-list) Room's formatted latest timestamp is empty: %s (%s)" id display-name)
(setf formatted-timestamp "[empty latest timestamp?]"))
;; FIXME: Remove this check when ts-0.3 is released
;; (with the fix also included in ts-0.2.1).
(message "Ement: Please upgrade the `ts' library to fix a bug")
(setf formatted-timestamp "0s"))
(propertize formatted-timestamp 'value latest-ts)))
(e-session (propertize (ement-user-id (ement-session-user session))
'value session))

View file

@ -6,7 +6,7 @@
;; Keywords: comm
;; URL: https://github.com/alphapapa/ement.el
;; Package-Version: 0.1-pre
;; Package-Requires: ((emacs "26.3") (plz "0.1-pre") (ts "0.2"))
;; Package-Requires: ((emacs "26.3") (plz "0.1-pre") (ts "0.2.1"))
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by