FIX: Stop incoming message tracking after navigating away. (#14498)

This commit is contained in:
Alan Guo Xiang Tan 2021-10-05 11:17:20 +08:00 committed by GitHub
parent bbf9650736
commit d82e5cd37c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -49,7 +49,7 @@ export default Controller.extend(BulkTopicSelection, {
},
unsubscribe() {
this.pmTopicTrackingState.resetIncomingTracking();
this.pmTopicTrackingState.stopIncomingTracking();
},
@action

View File

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