FIX: reverse insert order when grabbing new topics
This commit is contained in:
parent
0b01310c84
commit
df30cb43ec
|
@ -108,10 +108,12 @@ Discourse.TopicList = Discourse.Model.extend({
|
||||||
|
|
||||||
Discourse.TopicList.loadTopics(topic_ids, this.get('filter'))
|
Discourse.TopicList.loadTopics(topic_ids, this.get('filter'))
|
||||||
.then(function(newTopics){
|
.then(function(newTopics){
|
||||||
|
var i = 0;
|
||||||
topicList.forEachNew(newTopics, function(t) {
|
topicList.forEachNew(newTopics, function(t) {
|
||||||
// highlight the first of the new topics so we can get a visual feedback
|
// highlight the first of the new topics so we can get a visual feedback
|
||||||
t.set('highlight', true);
|
t.set('highlight', true);
|
||||||
topics.insertAt(0,t);
|
topics.insertAt(i,t);
|
||||||
|
i++;
|
||||||
});
|
});
|
||||||
Discourse.Session.currentProp('topicList', topicList);
|
Discourse.Session.currentProp('topicList', topicList);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue