FIX: Clicking "Latest" while ordering by a column should reset the

order.
This commit is contained in:
Robin Ward 2014-10-07 15:19:17 -04:00
parent bb192dd0a3
commit e20c82436d
2 changed files with 6 additions and 1 deletions

View file

@ -37,6 +37,8 @@ var controllerOpts = {
var filter = this.get('model.filter'),
self = this;
this.setProperties({ order: 'default', ascending: false });
// Don't refresh if we're still loading
if (this.get('controllers.discovery.loading')) { return; }

View file

@ -250,7 +250,10 @@ Discourse.URL = Em.Object.createWithMixins({
navigatedToHome: function(oldPath, path) {
var homepage = Discourse.Utilities.defaultHomepage();
if (window.history && window.history.pushState && path === "/" && (oldPath === "/" || oldPath === "/" + homepage)) {
if (window.history &&
window.history.pushState &&
(path === "/" || path === "/" + homepage) &&
(oldPath === "/" || oldPath === "/" + homepage)) {
this.appEvents.trigger('url:refresh');
return true;
}