[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ement c8fa9444cd 2/2: Add: (ement-room-reaction-names-l
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/ement c8fa9444cd 2/2: Add: (ement-room-reaction-names-limit) |
|
Date: |
Tue, 9 Jan 2024 03:57:57 -0500 (EST) |
branch: externals/ement
commit c8fa9444cd6a31cb1b3931cccc173a2dc7a8f843
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Add: (ement-room-reaction-names-limit)
---
README.org | 2 +-
ement-room.el | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index 3ee68bcfd6..1243f6f44b 100644
--- a/README.org
+++ b/README.org
@@ -299,7 +299,7 @@ Ement.el doesn't support encrypted rooms natively, but it
can be used transparen
+ Customization group ~ement-room-list~.
+ Option ~ement-room-list-space-prefix~ is applied to space names in the room
list (e.g. set to empty string for cleaner appearance).
-+ Reactions sent by only one user are displayed with the user's name (so it's
not necessary to check the tooltip).
++ Option ~ement-room-reaction-names-limit~ sets how many senders of a reaction
are shown in the buffer (more than that many are shown in the tooltip).
*Changes*
diff --git a/ement-room.el b/ement-room.el
index 0c2dc9f64f..ff4ecd73ea 100644
--- a/ement-room.el
+++ b/ement-room.el
@@ -252,6 +252,12 @@ Does not include filenames, emotes, etc.")
Called with two arguments, the room and the session."
:type 'hook)
+(defcustom ement-room-reaction-names-limit 3
+ "Up to this many users, show a reaction's senders' names.
+If more than this many users have sent a reaction, show the
+number of senders instead (and the names in a tooltip)."
+ :type 'natnum)
+
;;;;; Faces
(defface ement-room-name
@@ -3357,9 +3363,9 @@ Formats according to `ement-room-message-format-spec',
which see."
(pcase-let* ((`(,key . ,senders) ks)
(key (propertize key 'face 'ement-room-reactions-key))
(count (propertize (format " (%s)"
- (if (length= senders 1)
-
(ement--user-displayname-in room (car senders))
- (length senders)))
+ (if (length> senders
ement-room-reaction-names-limit)
+ (length senders)
+ (senders-names senders
room)))
'face 'ement-room-reactions))
(string
(propertize (concat key count)