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,
|
||||
});
|
||||
},
|
||||
|
||||
setUserStatus() {
|
||||
showModal("user-status", {
|
||||
title: "user_status.set_custom_status",
|
||||
modalClass: "user-status",
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
renderTemplate() {
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
toggleAnonymous=(route-action "toggleAnonymous")
|
||||
logout=(route-action "logout")
|
||||
toggleSidebar=(route-action "toggleSidebar")
|
||||
setUserStatus=(route-action "setUserStatus")
|
||||
}}
|
||||
{{software-update-prompt}}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import { Promise } from "rsvp";
|
|||
import QuickAccessItem from "discourse/widgets/quick-access-item";
|
||||
import QuickAccessPanel from "discourse/widgets/quick-access-panel";
|
||||
import { createWidgetFrom } from "discourse/widgets/widget";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
|
||||
const _extraItems = [];
|
||||
|
||||
|
@ -46,7 +47,10 @@ createWidgetFrom(QuickAccessItem, "user-status-item", {
|
|||
|
||||
hideMenuAndSetStatus() {
|
||||
this.sendWidgetAction("toggleUserMenu");
|
||||
this.sendWidgetAction("setUserStatus");
|
||||
showModal("user-status", {
|
||||
title: "user_status.set_custom_status",
|
||||
modalClass: "user-status",
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue