mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Show bookmarks loading spinner correctly (#17726)
There was a minor issue where the bookmark loading spinner would not show correctly because of how the route was handling the setting of loading, this fixes the issue.
This commit is contained in:
@@ -15,7 +15,7 @@ export default Controller.extend({
|
||||
|
||||
application: controller(),
|
||||
user: controller(),
|
||||
loading: false,
|
||||
loading: true,
|
||||
loadingMore: false,
|
||||
permissionDenied: false,
|
||||
inSearchMode: notEmpty("q"),
|
||||
|
||||
@@ -40,7 +40,8 @@ export default DiscourseRoute.extend({
|
||||
this.session.set("bookmarksModel", model);
|
||||
return model;
|
||||
})
|
||||
.catch(() => controller.set("permissionDenied", true));
|
||||
.catch(() => controller.set("permissionDenied", true))
|
||||
.finally(() => controller.set("loading", false));
|
||||
},
|
||||
|
||||
renderTemplate() {
|
||||
@@ -53,15 +54,6 @@ export default DiscourseRoute.extend({
|
||||
return true;
|
||||
},
|
||||
|
||||
@action
|
||||
loading(transition) {
|
||||
let controller = this.controllerFor("user-activity-bookmarks");
|
||||
controller.set("loading", true);
|
||||
transition.promise.finally(function () {
|
||||
controller.set("loading", false);
|
||||
});
|
||||
},
|
||||
|
||||
@action
|
||||
triggerRefresh() {
|
||||
this.refresh();
|
||||
|
||||
Reference in New Issue
Block a user