From 061a6cdafa13041b49c3ae617f8ebbe444329aac Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 21 Sep 2018 11:28:11 +0930 Subject: [PATCH] Remove notification pluralization logic Since we don't return an "unread count" in the API, this pluralization logic is useless at the moment. Related to #643 and #716 but really needs further thought in #868. --- .../forum/components/PostMentionedNotification.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/extensions/mentions/js/src/forum/components/PostMentionedNotification.js b/extensions/mentions/js/src/forum/components/PostMentionedNotification.js index a3f69bf90..db7ac4cc6 100644 --- a/extensions/mentions/js/src/forum/components/PostMentionedNotification.js +++ b/extensions/mentions/js/src/forum/components/PostMentionedNotification.js @@ -1,6 +1,4 @@ import Notification from 'flarum/components/Notification'; -import username from 'flarum/helpers/username'; -import punctuateSeries from 'flarum/helpers/punctuateSeries'; export default class PostMentionedNotification extends Notification { icon() { @@ -10,24 +8,16 @@ export default class PostMentionedNotification extends Notification { href() { const notification = this.props.notification; const post = notification.subject(); - const auc = notification.additionalUnreadCount(); const content = notification.content(); - return app.route.discussion(post.discussion(), auc ? post.number() : (content && content.replyNumber)); + return app.route.discussion(post.discussion(), content && content.replyNumber); } content() { const notification = this.props.notification; - const auc = notification.additionalUnreadCount(); const user = notification.fromUser(); - return app.translator.transChoice('flarum-mentions.forum.notifications.post_mentioned_text', auc + 1, { - user, - username: auc ? punctuateSeries([ - username(user), - app.translator.transChoice('flarum-mentions.forum.notifications.others_text', auc, {count: auc}) - ]) : undefined - }); + return app.translator.transChoice('flarum-mentions.forum.notifications.post_mentioned_text', 1, {user}); } excerpt() {