From a5aad5cd170e1ace28bee18753eaa266c0560506 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 Nov 2021 10:01:07 +0000 Subject: [PATCH] Hide server options hint when disable_custom_urls is true --- src/components/views/elements/ServerPicker.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/ServerPicker.tsx b/src/components/views/elements/ServerPicker.tsx index 5e6ef62504a..51b18ac6c2b 100644 --- a/src/components/views/elements/ServerPicker.tsx +++ b/src/components/views/elements/ServerPicker.tsx @@ -53,8 +53,10 @@ const onHelpClick = () => { }; const ServerPicker = ({ title, dialogTitle, serverConfig, onServerConfigChange }: IProps) => { + const disableCustomUrls = SdkConfig.get()["disable_custom_urls"]; + let editBtn; - if (!SdkConfig.get()["disable_custom_urls"] && onServerConfigChange) { + if (!disableCustomUrls && onServerConfigChange) { const onClick = () => { showPickerDialog(dialogTitle, serverConfig, (config?: ValidatedServerConfig) => { if (config) { @@ -83,7 +85,7 @@ const ServerPicker = ({ title, dialogTitle, serverConfig, onServerConfigChange } return

{ title || _t("Homeserver") }

- + { !disableCustomUrls ? : null } { serverName } { editBtn } { desc }