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:
parent
5df815c2ee
commit
784da19e4c
|
@ -83,7 +83,6 @@ const controllerOpts = {
|
|||
},
|
||||
|
||||
resetNew() {
|
||||
this.topicTrackingState.resetNew();
|
||||
Topic.resetNew(this.category, !this.noSubcategories).then(() =>
|
||||
this.send("refresh")
|
||||
);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue