diff --git a/app/assets/javascripts/discourse/components/topic-list.js.es6 b/app/assets/javascripts/discourse/components/topic-list.js.es6 index 522efc43468..260bddb756e 100644 --- a/app/assets/javascripts/discourse/components/topic-list.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-list.js.es6 @@ -40,12 +40,12 @@ export default Ember.Component.extend({ } }, - @observes('topics', 'order', 'ascending', 'category') + @observes('topics', 'order', 'ascending', 'category', 'top') lastVisitedTopicChanged() { this.refreshLastVisited(); }, - _updateLastVisitedTopic(topics, order, ascending) { + _updateLastVisitedTopic(topics, order, ascending, top) { this.set('lastVisitedTopic', null); @@ -57,6 +57,10 @@ export default Ember.Component.extend({ return; } + if (top) { + return; + } + if (!topics || topics.length === 1) { return; } @@ -103,7 +107,7 @@ export default Ember.Component.extend({ }, refreshLastVisited() { - this._updateLastVisitedTopic(this.get('topics'), this.get('order'), this.get('ascending')); + this._updateLastVisitedTopic(this.get('topics'), this.get('order'), this.get('ascending'), this.get('top')); }, click(e) { diff --git a/app/assets/javascripts/discourse/templates/discovery/topics.hbs b/app/assets/javascripts/discourse/templates/discovery/topics.hbs index 2f9ec77044a..8d0ab34d9e2 100644 --- a/app/assets/javascripts/discourse/templates/discovery/topics.hbs +++ b/app/assets/javascripts/discourse/templates/discovery/topics.hbs @@ -34,6 +34,7 @@ {{#if hasTopics}} {{topic-list highlightLastVisited=true + top=top showTopicPostBadges=showTopicPostBadges showPosters=true currentUser=currentUser