Merge pull request #4541 from xfalcox/no-last-visit-on-top
FIX: Last Visit line shouldn't appear on /top
This commit is contained in:
commit
13a40d2f99
|
@ -40,12 +40,12 @@ export default Ember.Component.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@observes('topics', 'order', 'ascending', 'category')
|
@observes('topics', 'order', 'ascending', 'category', 'top')
|
||||||
lastVisitedTopicChanged() {
|
lastVisitedTopicChanged() {
|
||||||
this.refreshLastVisited();
|
this.refreshLastVisited();
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateLastVisitedTopic(topics, order, ascending) {
|
_updateLastVisitedTopic(topics, order, ascending, top) {
|
||||||
|
|
||||||
this.set('lastVisitedTopic', null);
|
this.set('lastVisitedTopic', null);
|
||||||
|
|
||||||
|
@ -57,6 +57,10 @@ export default Ember.Component.extend({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (top) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!topics || topics.length === 1) {
|
if (!topics || topics.length === 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +107,7 @@ export default Ember.Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
refreshLastVisited() {
|
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) {
|
click(e) {
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
{{#if hasTopics}}
|
{{#if hasTopics}}
|
||||||
{{topic-list
|
{{topic-list
|
||||||
highlightLastVisited=true
|
highlightLastVisited=true
|
||||||
|
top=top
|
||||||
showTopicPostBadges=showTopicPostBadges
|
showTopicPostBadges=showTopicPostBadges
|
||||||
showPosters=true
|
showPosters=true
|
||||||
currentUser=currentUser
|
currentUser=currentUser
|
||||||
|
|
Loading…
Reference in New Issue