From 6fdbd29882d487bcd3837f99b9019f3a2475590a Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 9 May 2017 13:46:10 -0400 Subject: [PATCH] FIX: Dismiss all button was not updating the UI --- .../javascripts/discourse/controllers/user-notifications.js.es6 | 2 +- .../javascripts/discourse/templates/user/notifications.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 b/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 index 44b25f1043c..7f8dff22ec1 100644 --- a/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 @@ -22,7 +22,7 @@ export default Ember.Controller.extend({ actions: { resetNew() { ajax('/notifications/mark-read', { method: 'PUT' }).then(() => { - this.setEach('read', true); + this.get('model').forEach(n => n.set('read', true)); }); }, diff --git a/app/assets/javascripts/discourse/templates/user/notifications.hbs b/app/assets/javascripts/discourse/templates/user/notifications.hbs index ecba8f9188f..ce0128519f4 100644 --- a/app/assets/javascripts/discourse/templates/user/notifications.hbs +++ b/app/assets/javascripts/discourse/templates/user/notifications.hbs @@ -21,7 +21,7 @@ {{#if model}} {{d-button title='user.dismiss_notifications_tooltip' class='btn dismiss-notifications' - action="resetNew" + action=(action "resetNew") label='user.dismiss_notifications' icon='check' disabled=allNotificationsRead}}