mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Don't use __container__ instead use needs: ['user-notifications'], (thanks eviltrout!)
This commit is contained in:
parent
8f390c979b
commit
ac708b4068
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
export default Ember.ArrayController.extend({
|
export default Ember.ArrayController.extend({
|
||||||
|
needs: ['user-notifications'],
|
||||||
canLoadMore: true,
|
canLoadMore: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
showDismissButton: function() {
|
showDismissButton: function() {
|
||||||
@ -8,9 +9,9 @@ export default Ember.ArrayController.extend({
|
|||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
resetNew: function() {
|
resetNew: function() {
|
||||||
|
var self = this;
|
||||||
Discourse.NotificationContainer.resetNew().then(function() {
|
Discourse.NotificationContainer.resetNew().then(function() {
|
||||||
var c = Discourse.__container__.lookup("controller:UserNotifications")
|
self.get('controllers.user-notifications').setEach('read', true);
|
||||||
c.setEach("read", true)
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user