Skip to content

Commit

Permalink
user_status: Show change status modal when clicked on emoji in buddy …
Browse files Browse the repository at this point in the history
…list.

Fixes #19506
  • Loading branch information
ganpa3 committed Aug 7, 2021
1 parent 21c00b1 commit 2e4c82f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions static/js/popovers.js
Expand Up @@ -970,14 +970,23 @@ export function register_click_handlers() {
e.preventDefault();
});

$("body").on("click", ".update_status_text", (e) => {
function open_user_status_modal(e) {
hide_all();

user_status_ui.open_user_status_modal();

e.stopPropagation();
e.preventDefault();
});
}

$("body").on("click", ".update_status_text", open_user_status_modal);

// Clicking on one's own status emoji should open the user status modal.
$("#user_presences").on(
"click",
".user_sidebar_entry_me .status_emoji",
open_user_status_modal,
);

$("body").on("click", ".info_popover_actions .sidebar-popover-mute-user", (e) => {
const user_id = elem_to_user_id($(e.target).parents("ul"));
Expand Down

0 comments on commit 2e4c82f

Please sign in to comment.