Merge pull request #4475 from xfalcox/last-visit-adjusts

FIX: Last visit must keep working when changing categories
This commit is contained in:
Sam 2016-10-04 19:31:22 +11:00 committed by GitHub
commit baecaddef0
1 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,9 @@ export default Ember.Component.extend({
@computed('topics.@each', 'order', 'ascending')
lastVisitedTopic(topics, order, ascending) {
this._cleanLastVisitedTopic();
if (!this.get('highlightLastVisited')) { return; }
if (order !== "default" && order !== "activity") { return; }
if (!topics || topics.length === 1) { return; }
@ -85,7 +88,6 @@ export default Ember.Component.extend({
},
@observes('category')
@on('willDestroyElement')
_cleanLastVisitedTopic() {
const prevTopic = this.get('prevTopic');