DEV: Avoid unnecessary sendWidgetAction function call (#16941)

This commit is contained in:
Andrei Prigorshnev 2022-05-30 13:06:51 +04:00 committed by GitHub
parent 9931914203
commit 46302f0d40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 9 deletions

View File

@ -252,13 +252,6 @@ const ApplicationRoute = DiscourseRoute.extend(OpenComposer, {
hasGroups,
});
},
setUserStatus() {
showModal("user-status", {
title: "user_status.set_custom_status",
modalClass: "user-status",
});
},
},
renderTemplate() {

View File

@ -10,7 +10,6 @@
toggleAnonymous=(route-action "toggleAnonymous")
logout=(route-action "logout")
toggleSidebar=(route-action "toggleSidebar")
setUserStatus=(route-action "setUserStatus")
}}
{{software-update-prompt}}

View File

@ -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",
});
},
});