FIX: Last visit must keep working when changing categories

This commit is contained in:
Rafael dos Santos Silva 2016-09-29 17:40:28 -03:00
parent 2ce8845c89
commit 5476dee52d
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');