FIX: Cached new topic data should not be deleted after dismiss new (#8660)

43ddf60cdf introduced a new method for dismissing new topics in topic-tracking-state, which works on a per-category basis.

This commit removes the old mechanism, which was to delete all 'new' topics from the local tracking state, regardless of category.
This commit is contained in:
David Taylor 2020-01-06 16:22:40 +00:00 committed by GitHub
parent 5df815c2ee
commit 784da19e4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 9 deletions

View File

@ -83,7 +83,6 @@ const controllerOpts = {
},
resetNew() {
this.topicTrackingState.resetNew();
Topic.resetNew(this.category, !this.noSubcategories).then(() =>
this.send("refresh")
);

View File

@ -381,14 +381,6 @@ const TopicTrackingState = EmberObject.extend({
.value().length;
},
resetNew() {
Object.keys(this.states).forEach(id => {
if (this.states[id].last_read_post_number === null) {
delete this.states[id];
}
});
},
countUnread(category_id) {
return _.chain(this.states)
.filter(isUnread)