From ac708b4068ce77fa88efe4526d9576f39445c401 Mon Sep 17 00:00:00 2001 From: cpradio Date: Tue, 14 Oct 2014 16:23:20 -0400 Subject: [PATCH] Don't use __container__ instead use needs: ['user-notifications'], (thanks eviltrout!) --- .../discourse/controllers/user-notifications.js.es6 | 5 +++-- 1 file changed, 3 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 45f3c22f6..fc511df43 100644 --- a/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 @@ -1,5 +1,6 @@ export default Ember.ArrayController.extend({ + needs: ['user-notifications'], canLoadMore: true, loading: false, showDismissButton: function() { @@ -8,9 +9,9 @@ export default Ember.ArrayController.extend({ actions: { resetNew: function() { + var self = this; Discourse.NotificationContainer.resetNew().then(function() { - var c = Discourse.__container__.lookup("controller:UserNotifications") - c.setEach("read", true) + self.get('controllers.user-notifications').setEach('read', true); }); },