1
0
mirror of https://github.com/flarum/core.git synced 2025-08-13 20:04:24 +02:00

fix(mentions): missed post mentions UI changes (#3832)

Co-authored-by: Ian Morland <ian@morland.me>
This commit is contained in:
Rafael Horvat
2023-07-01 18:44:59 +02:00
committed by GitHub
parent 5437bf5c23
commit 2bc2899a1d
2 changed files with 12 additions and 2 deletions

View File

@@ -118,7 +118,7 @@ export default function addMentionedByList() {
});
const limit = 4;
const overLimit = repliers.length > limit;
const overLimit = post.mentionedByCount() > limit;
// Create a list of unique users who have replied. So even if a user has
// replied twice, they will only be in this array once.
@@ -136,7 +136,7 @@ export default function addMentionedByList() {
// others" name to the end of the list. Clicking on it will display a modal
// with a full list of names.
if (overLimit) {
const count = repliers.length - names.length;
const count = post.mentionedByCount() - names.length;
names.push(app.translator.trans('flarum-mentions.forum.post.others_text', { count }));
}