Skip to content

A platform for community discussion. Free, open, simple.

REVERT: Resetting the filters is causing double transitions

Robin Ward232d277833c5
diff --git a/app/assets/javascripts/discourse/app/routes/build-category-route.js b/app/assets/javascripts/discourse/app/routes/build-category-route.js
index aab3d9c039a..78c08dd2163 100644
--- a/app/assets/javascripts/discourse/app/routes/build-category-route.js
+++ b/app/assets/javascripts/discourse/app/routes/build-category-route.js
@@ -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);
diff --git a/app/assets/javascripts/discourse/app/routes/build-topic-route.js b/app/assets/javascripts/discourse/app/routes/build-topic-route.js
index e175c703c9e..6b6b8dadc28 100644
--- a/app/assets/javascripts/discourse/app/routes/build-topic-route.js
+++ b/app/assets/javascripts/discourse/app/routes/build-topic-route.js
@@ -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", {