REVERT: Resetting the filters is causing double transitions
This commit is contained in:
parent
33982c0c9e
commit
232d277833
|
@ -10,7 +10,6 @@ import PermissionType from "discourse/models/permission-type";
|
|||
import CategoryList from "discourse/models/category-list";
|
||||
import Category from "discourse/models/category";
|
||||
import { Promise, all } from "rsvp";
|
||||
import { action } from "@ember/object";
|
||||
|
||||
// A helper function to create a category route with parameters
|
||||
export default (filterArg, params) => {
|
||||
|
@ -230,29 +229,6 @@ export default (filterArg, params) => {
|
|||
});
|
||||
},
|
||||
|
||||
resetParams(controller) {
|
||||
controller.setProperties({
|
||||
order: "default",
|
||||
ascending: false,
|
||||
max_posts: null
|
||||
});
|
||||
},
|
||||
|
||||
@action
|
||||
willTransition() {
|
||||
this._super(...arguments);
|
||||
|
||||
if (this.controller) {
|
||||
this.resetParams(this.controller);
|
||||
}
|
||||
},
|
||||
|
||||
resetController(controller, isExiting) {
|
||||
if (isExiting) {
|
||||
this.resetParams(controller);
|
||||
}
|
||||
},
|
||||
|
||||
deactivate() {
|
||||
this._super(...arguments);
|
||||
this.searchService.set("searchContext", null);
|
||||
|
|
|
@ -6,7 +6,6 @@ import { defaultHomepage } from "discourse/lib/utilities";
|
|||
import Session from "discourse/models/session";
|
||||
import { Promise } from "rsvp";
|
||||
import Site from "discourse/models/site";
|
||||
import { action } from "@ember/object";
|
||||
|
||||
// A helper to build a topic route for a filter
|
||||
function filterQueryParams(params, defaultParams) {
|
||||
|
@ -148,29 +147,6 @@ export default function(filter, extras) {
|
|||
);
|
||||
},
|
||||
|
||||
resetParams(controller) {
|
||||
controller.setProperties({
|
||||
order: "default",
|
||||
ascending: false,
|
||||
max_posts: null
|
||||
});
|
||||
},
|
||||
|
||||
@action
|
||||
willTransition() {
|
||||
this._super(...arguments);
|
||||
|
||||
if (this.controller) {
|
||||
this.resetParams(this.controller);
|
||||
}
|
||||
},
|
||||
|
||||
resetController(controller, isExiting) {
|
||||
if (isExiting) {
|
||||
this.resetParams(controller);
|
||||
}
|
||||
},
|
||||
|
||||
renderTemplate() {
|
||||
this.render("navigation/default", { outlet: "navigation-bar" });
|
||||
this.render("discovery/topics", {
|
||||
|
|
Loading…
Reference in New Issue