compose: Never hide send button.

`Press Enter to send` used to hide `Send` button, we remove that
behaviour.

We show the current state of `Enter` hotkey action via text below
`Send` button which can toggle behaviour on click.
This commit is contained in:
Aman Agrawal
2021-11-25 09:00:04 +00:00
committed by Tim Abbott
parent 219ecea659
commit 25ee6a795e
11 changed files with 78 additions and 70 deletions

View File

@@ -119,15 +119,6 @@ export function empty_topic_placeholder() {
return $t({defaultMessage: "(no topic)"});
}
export function toggle_enter_sends_ui() {
const send_button = $("#compose-send-button");
if (user_settings.enter_sends) {
send_button.fadeOut();
} else {
send_button.fadeIn();
}
}
export function create_message_object() {
// Topics are optional, and we provide a placeholder if one isn't given.
let topic = compose_state.topic();
@@ -413,6 +404,7 @@ export function render_compose_box() {
giphy_enabled: giphy.is_giphy_enabled(),
}),
);
$(`.enter_sends_${user_settings.enter_sends}`).show();
}
export function initialize() {