reaction.js: Update toggle_reaction().

Created get_selected_emoji() function.
toggle_reaction() now doesn't require emoji_name
and automatically looks for a selected_emoji
if possible.
This commit is contained in:
Joshua Pan
2017-04-19 05:49:54 +00:00
parent cddee49e75
commit cd28ea6d07
2 changed files with 16 additions and 0 deletions

View File

@@ -282,6 +282,11 @@ exports.process_enter_key = function (e) {
return true;
}
if (popovers.reactions_popped()) {
reactions.toggle_reaction(current_msg_list.selected_id());
return true;
}
if (exports.is_editing_stream_name(e)) {
$(e.target).parent().find(".checkmark").click();
return false;