REVERT: Resetting the filters is causing double transitions

This commit is contained in:
Robin Ward 2020-08-07 16:38:41 -04:00
parent 33982c0c9e
commit 232d277833
2 changed files with 0 additions and 48 deletions

View File

@ -10,7 +10,6 @@ import PermissionType from "discourse/models/permission-type";
import CategoryList from "discourse/models/category-list"; import CategoryList from "discourse/models/category-list";
import Category from "discourse/models/category"; import Category from "discourse/models/category";
import { Promise, all } from "rsvp"; import { Promise, all } from "rsvp";
import { action } from "@ember/object";
// A helper function to create a category route with parameters // A helper function to create a category route with parameters
export default (filterArg, params) => { 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() { deactivate() {
this._super(...arguments); this._super(...arguments);
this.searchService.set("searchContext", null); this.searchService.set("searchContext", null);

View File

@ -6,7 +6,6 @@ import { defaultHomepage } from "discourse/lib/utilities";
import Session from "discourse/models/session"; import Session from "discourse/models/session";
import { Promise } from "rsvp"; import { Promise } from "rsvp";
import Site from "discourse/models/site"; import Site from "discourse/models/site";
import { action } from "@ember/object";
// A helper to build a topic route for a filter // A helper to build a topic route for a filter
function filterQueryParams(params, defaultParams) { 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() { renderTemplate() {
this.render("navigation/default", { outlet: "navigation-bar" }); this.render("navigation/default", { outlet: "navigation-bar" });
this.render("discovery/topics", { this.render("discovery/topics", {