FIX: Retain back button scroll position even if we don't load more.

This commit is contained in:
Robin Ward 2014-08-27 13:33:52 -04:00
parent f10d6ed88a
commit b1c0a3d01c
2 changed files with 4 additions and 1 deletions

View File

@ -234,6 +234,7 @@ Discourse.TopicList.reopenClass({
tracking.sync(list, list.filter);
tracking.trackIncoming(list.filter);
}
Discourse.Session.currentProp('topicList', list);
return list;
});
},

View File

@ -36,7 +36,9 @@ Discourse.DiscoveryRoute = Discourse.Route.extend(Discourse.ScrollTop, Discourse
var controller = this.controllerFor('discovery');
Ember.run.cancel(controller.get('scheduledSpinner'));
controller.setProperties({ loading: false, loadingSpinner: false });
this._scrollTop();
if (!Discourse.Session.currentProp('topicListScrollPosition')) {
this._scrollTop();
}
},
didTransition: function() {