FIX: only trigger notification level change if it actually changes

avoids double ajax call every time notification level changes
This commit is contained in:
Sam 2017-05-16 16:52:30 -04:00
parent 733b0009cb
commit 68df8f4427

View File

@ -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;
}
}