DEV: Avoid unnecessary sendWidgetAction function call (#16941)
This commit is contained in:
parent
9931914203
commit
46302f0d40
|
@ -252,13 +252,6 @@ const ApplicationRoute = DiscourseRoute.extend(OpenComposer, {
|
||||||
hasGroups,
|
hasGroups,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
setUserStatus() {
|
|
||||||
showModal("user-status", {
|
|
||||||
title: "user_status.set_custom_status",
|
|
||||||
modalClass: "user-status",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
renderTemplate() {
|
renderTemplate() {
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
toggleAnonymous=(route-action "toggleAnonymous")
|
toggleAnonymous=(route-action "toggleAnonymous")
|
||||||
logout=(route-action "logout")
|
logout=(route-action "logout")
|
||||||
toggleSidebar=(route-action "toggleSidebar")
|
toggleSidebar=(route-action "toggleSidebar")
|
||||||
setUserStatus=(route-action "setUserStatus")
|
|
||||||
}}
|
}}
|
||||||
{{software-update-prompt}}
|
{{software-update-prompt}}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { Promise } from "rsvp";
|
||||||
import QuickAccessItem from "discourse/widgets/quick-access-item";
|
import QuickAccessItem from "discourse/widgets/quick-access-item";
|
||||||
import QuickAccessPanel from "discourse/widgets/quick-access-panel";
|
import QuickAccessPanel from "discourse/widgets/quick-access-panel";
|
||||||
import { createWidgetFrom } from "discourse/widgets/widget";
|
import { createWidgetFrom } from "discourse/widgets/widget";
|
||||||
|
import showModal from "discourse/lib/show-modal";
|
||||||
|
|
||||||
const _extraItems = [];
|
const _extraItems = [];
|
||||||
|
|
||||||
|
@ -46,7 +47,10 @@ createWidgetFrom(QuickAccessItem, "user-status-item", {
|
||||||
|
|
||||||
hideMenuAndSetStatus() {
|
hideMenuAndSetStatus() {
|
||||||
this.sendWidgetAction("toggleUserMenu");
|
this.sendWidgetAction("toggleUserMenu");
|
||||||
this.sendWidgetAction("setUserStatus");
|
showModal("user-status", {
|
||||||
|
title: "user_status.set_custom_status",
|
||||||
|
modalClass: "user-status",
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue