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:
parent
6849775a2d
commit
6bb77d3055
|
@ -15,7 +15,7 @@ export default Controller.extend({
|
||||||
|
|
||||||
application: controller(),
|
application: controller(),
|
||||||
user: controller(),
|
user: controller(),
|
||||||
loading: false,
|
loading: true,
|
||||||
loadingMore: false,
|
loadingMore: false,
|
||||||
permissionDenied: false,
|
permissionDenied: false,
|
||||||
inSearchMode: notEmpty("q"),
|
inSearchMode: notEmpty("q"),
|
||||||
|
|
|
@ -40,7 +40,8 @@ export default DiscourseRoute.extend({
|
||||||
this.session.set("bookmarksModel", model);
|
this.session.set("bookmarksModel", model);
|
||||||
return model;
|
return model;
|
||||||
})
|
})
|
||||||
.catch(() => controller.set("permissionDenied", true));
|
.catch(() => controller.set("permissionDenied", true))
|
||||||
|
.finally(() => controller.set("loading", false));
|
||||||
},
|
},
|
||||||
|
|
||||||
renderTemplate() {
|
renderTemplate() {
|
||||||
|
@ -53,15 +54,6 @@ export default DiscourseRoute.extend({
|
||||||
return true;
|
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
|
@action
|
||||||
triggerRefresh() {
|
triggerRefresh() {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
|
Loading…
Reference in New Issue