mirror of https://github.com/zulip/zulip.git
settings: Use the generic code block to set 'enter_sends' value.
This commit performs a minor code restructuring to use the generic code block for updating all the user_preferences settings values. No need to use a separate code block for 'enter_sends' setting.
This commit is contained in:
parent
eacf54d52d
commit
340140954b
|
@ -733,6 +733,7 @@ export function dispatch_normal_event(event) {
|
|||
"send_private_typing_notifications",
|
||||
"send_read_receipts",
|
||||
"web_navigate_to_sent_message",
|
||||
"enter_sends",
|
||||
];
|
||||
|
||||
const original_home_view = user_settings.web_home_view;
|
||||
|
@ -851,9 +852,6 @@ export function dispatch_normal_event(event) {
|
|||
if (event.property === "web_escape_navigates_to_home_view") {
|
||||
$("#go-to-home-view-hotkey-help").toggleClass("notdisplayed", !event.value);
|
||||
}
|
||||
if (event.property === "enter_sends") {
|
||||
user_settings.enter_sends = event.value;
|
||||
}
|
||||
if (event.property === "presence_enabled") {
|
||||
user_settings.presence_enabled = event.value;
|
||||
$("#user_presence_enabled").prop("checked", user_settings.presence_enabled);
|
||||
|
|
Loading…
Reference in New Issue