diff --git a/app/assets/javascripts/discourse/components/topic-notifications-button.js.es6 b/app/assets/javascripts/discourse/components/topic-notifications-button.js.es6 index 35aefe20475..4e2163122f4 100644 --- a/app/assets/javascripts/discourse/components/topic-notifications-button.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-notifications-button.js.es6 @@ -15,5 +15,6 @@ export default MountWidget.extend({ didInsertElement() { this._super(); + this.dispatch('topic-notifications-button:changed', 'topic-notifications-button'); } }); diff --git a/app/assets/javascripts/discourse/widgets/topic-notifications-button.js.es6 b/app/assets/javascripts/discourse/widgets/topic-notifications-button.js.es6 index 4bf84e56316..bd37c8b4d8a 100644 --- a/app/assets/javascripts/discourse/widgets/topic-notifications-button.js.es6 +++ b/app/assets/javascripts/discourse/widgets/topic-notifications-button.js.es6 @@ -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; } }