mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Dismiss all button was not updating the UI
This commit is contained in:
parent
a160589e84
commit
6fdbd29882
@ -22,7 +22,7 @@ export default Ember.Controller.extend({
|
|||||||
actions: {
|
actions: {
|
||||||
resetNew() {
|
resetNew() {
|
||||||
ajax('/notifications/mark-read', { method: 'PUT' }).then(() => {
|
ajax('/notifications/mark-read', { method: 'PUT' }).then(() => {
|
||||||
this.setEach('read', true);
|
this.get('model').forEach(n => n.set('read', true));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
{{#if model}}
|
{{#if model}}
|
||||||
{{d-button title='user.dismiss_notifications_tooltip'
|
{{d-button title='user.dismiss_notifications_tooltip'
|
||||||
class='btn dismiss-notifications'
|
class='btn dismiss-notifications'
|
||||||
action="resetNew"
|
action=(action "resetNew")
|
||||||
label='user.dismiss_notifications'
|
label='user.dismiss_notifications'
|
||||||
icon='check'
|
icon='check'
|
||||||
disabled=allNotificationsRead}}
|
disabled=allNotificationsRead}}
|
||||||
|
Loading…
Reference in New Issue
Block a user