mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
De-duplicate nicks in folded JOIN/PART/QUIT lines
This commit is contained in:
parent
800f5ceb6a
commit
96dd8476ad
1 changed files with 4 additions and 4 deletions
|
@ -297,7 +297,9 @@ class FoldGroup extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
let plural = byCommand[cmd].length > 1;
|
||||
let nicks = new Set(byCommand[cmd].map((msg) => msg.prefix.name));
|
||||
|
||||
let plural = nicks.size > 1;
|
||||
let action;
|
||||
switch (cmd) {
|
||||
case "JOIN":
|
||||
|
@ -317,9 +319,7 @@ class FoldGroup extends Component {
|
|||
content.push(", ");
|
||||
}
|
||||
|
||||
let nicks = byCommand[cmd].map((msg) => msg.prefix.name);
|
||||
|
||||
content.push(createNickList(nicks, createNick));
|
||||
content.push(createNickList([...nicks], createNick));
|
||||
content.push(" " + action);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue