From 0d586bb93c4791fbb6d993cca810ec7ff57f31c6 Mon Sep 17 00:00:00 2001 From: Krzysztof Kotlarek Date: Wed, 31 Aug 2022 11:16:13 +1000 Subject: [PATCH] FIX: use grouped_unread_notifications (#373) Use `grouped_unread_notifications` instead of `grouped_unread_high_priority_notifications` Related PR: https://github.com/discourse/discourse/pull/18132 --- .../discourse/components/user-menu/assigns-list.js | 2 +- test/javascripts/acceptance/assigns-tab-user-menu-test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/discourse/components/user-menu/assigns-list.js b/assets/javascripts/discourse/components/user-menu/assigns-list.js index a7dce4d..20229c8 100644 --- a/assets/javascripts/discourse/components/user-menu/assigns-list.js +++ b/assets/javascripts/discourse/components/user-menu/assigns-list.js @@ -71,7 +71,7 @@ export default class UserMenuAssignNotificationsList extends UserMenuNotificatio } get _unreadAssignedNotificationsCount() { - const key = `grouped_unread_high_priority_notifications.${this.site.notification_types.assigned}`; + const key = `grouped_unread_notifications.${this.site.notification_types.assigned}`; // we're retrieving the value with get() so that Ember tracks the property // and re-renders the UI when it changes. // we can stop using `get()` when the User model is refactored into native diff --git a/test/javascripts/acceptance/assigns-tab-user-menu-test.js b/test/javascripts/acceptance/assigns-tab-user-menu-test.js index 54ca976..b09a435 100644 --- a/test/javascripts/acceptance/assigns-tab-user-menu-test.js +++ b/test/javascripts/acceptance/assigns-tab-user-menu-test.js @@ -234,7 +234,7 @@ acceptance("Discourse Assign | experimental user menu", function (needs) { needs.user({ redesigned_user_menu_enabled: true, can_assign: true, - grouped_unread_high_priority_notifications: { + grouped_unread_notifications: { 34: 173, // assigned notification type }, }); @@ -286,7 +286,7 @@ acceptance("Discourse Assign | experimental user menu", function (needs) { ); updateCurrentUser({ - grouped_unread_high_priority_notifications: {}, + grouped_unread_notifications: {}, }); assert.notOk(