From e15bd194fde2c5ec21b216e7b594c543e8dc2739 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 20 Oct 2021 15:26:15 -0400 Subject: [PATCH] UX: Sometimes the footer would show up while refreshing a list route This happens because the state of `canLoadMore` is not cleared as the refresh occurs, which is enough to make the page think a footer should be displayed. No tests here because it's tricky to test refreshing and none of our existing acceptance tests seem to. --- .../javascripts/discourse/app/controllers/discovery/topics.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/discourse/app/controllers/discovery/topics.js b/app/assets/javascripts/discourse/app/controllers/discovery/topics.js index 347c7c3336e..b7aefc95875 100644 --- a/app/assets/javascripts/discourse/app/controllers/discovery/topics.js +++ b/app/assets/javascripts/discourse/app/controllers/discovery/topics.js @@ -74,6 +74,7 @@ const controllerOpts = { // router and ember throws an error due to missing `handlerInfos`. // Lesson learned: Don't call `loading` yourself. this.set("discovery.loading", true); + this.set("model.canLoadMore", true); this.topicTrackingState.resetTracking();