diff --git a/app/assets/javascripts/discourse/app/controllers/user-topics-list.js b/app/assets/javascripts/discourse/app/controllers/user-topics-list.js index c884703e733..ab93870d3cc 100644 --- a/app/assets/javascripts/discourse/app/controllers/user-topics-list.js +++ b/app/assets/javascripts/discourse/app/controllers/user-topics-list.js @@ -49,7 +49,7 @@ export default Controller.extend(BulkTopicSelection, { }, unsubscribe() { - this.pmTopicTrackingState.resetIncomingTracking(); + this.pmTopicTrackingState.stopIncomingTracking(); }, @action diff --git a/app/assets/javascripts/discourse/app/models/private-message-topic-tracking-state.js b/app/assets/javascripts/discourse/app/models/private-message-topic-tracking-state.js index b5aee27f6b9..3080a998aa6 100644 --- a/app/assets/javascripts/discourse/app/models/private-message-topic-tracking-state.js +++ b/app/assets/javascripts/discourse/app/models/private-message-topic-tracking-state.js @@ -81,6 +81,17 @@ const PrivateMessageTopicTrackingState = EmberObject.extend({ } }, + stopIncomingTracking() { + if (this.inbox) { + this.setProperties({ + newIncoming: [], + inbox: null, + filter: null, + activeGroup: null, + }); + } + }, + removeTopics(topicIds) { if (!this.isTracking) { return;