A platform for community discussion. Free, open, simple.
FIX: Cached new topic data should not be deleted after dismiss new (#8660)
David Taylor784da19e4c22
diff --git a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6index 14a6c597f8f..047960ba8a3 100644--- a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6+++ b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6@@ -83,7 +83,6 @@ const controllerOpts = {},resetNew() {- this.topicTrackingState.resetNew();Topic.resetNew(this.category, !this.noSubcategories).then(() =>this.send("refresh"));diff --git a/app/assets/javascripts/discourse/models/topic-tracking-state.js.es6 b/app/assets/javascripts/discourse/models/topic-tracking-state.js.es6index 82fc8d6f030..ac5f4a63402 100644--- a/app/assets/javascripts/discourse/models/topic-tracking-state.js.es6+++ b/app/assets/javascripts/discourse/models/topic-tracking-state.js.es6@@ -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)