mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 08:15:00 +00:00
FIX: only trigger notification level change if it actually changes
avoids double ajax call every time notification level changes
This commit is contained in:
parent
733b0009cb
commit
68df8f4427
@ -91,7 +91,9 @@ export default createWidget('topic-notifications-button', {
|
||||
topicNotificationsButtonChanged(msg) {
|
||||
switch(msg.type) {
|
||||
case 'notification':
|
||||
this.notificationLevelChanged(msg.id);
|
||||
if (this.attrs.topic.get('details.notification_level') !== msg.id) {
|
||||
this.notificationLevelChanged(msg.id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user