A platform for community discussion. Free, open, simple.
FIX: shows filter if there's no notifications to show after filter
Joffrey JAFFEUX5285cbee62ad
diff --git a/app/assets/javascripts/discourse/app/controllers/user-notifications.js b/app/assets/javascripts/discourse/app/controllers/user-notifications.jsindex e821b68364f..c0761e70dcb 100644--- a/app/assets/javascripts/discourse/app/controllers/user-notifications.js+++ b/app/assets/javascripts/discourse/app/controllers/user-notifications.js@@ -16,7 +16,7 @@ export default Controller.extend({},@discourseComputed("model.content.length", "filter")- hasNotifications(length, filter) {+ hasFilteredNotifications(length, filter) {if (filter === "read") {return this.model.filterBy("read", true).length > 0;} else if (filter === "unread") {diff --git a/app/assets/javascripts/discourse/app/templates/user/notifications-index.hbs b/app/assets/javascripts/discourse/app/templates/user/notifications-index.hbsindex adf5d0d11d8..b2c9185ec47 100644--- a/app/assets/javascripts/discourse/app/templates/user/notifications-index.hbs+++ b/app/assets/javascripts/discourse/app/templates/user/notifications-index.hbs@@ -8,9 +8,10 @@</div>{{/if}}-{{#if hasNotifications}}- {{notifications-filter value=filter onChange=(action "filterNotifications")}}- <span class="user-notifications-filter-separator"></span>+{{notifications-filter value=filter onChange=(action "filterNotifications")}}+<span class="user-notifications-filter-separator"></span>++{{#if hasFilteredNotifications}}{{user-notifications-large notifications=model filter=filter}}{{conditional-loading-spinner condition=loading}}{{else}}