From 340140954b290bd8fc907a4284dd22dddd00f506 Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Mon, 9 Sep 2024 17:32:19 +0530 Subject: [PATCH] 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. --- web/src/server_events_dispatch.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/src/server_events_dispatch.js b/web/src/server_events_dispatch.js index 054094019e..f266f9237a 100644 --- a/web/src/server_events_dispatch.js +++ b/web/src/server_events_dispatch.js @@ -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);