From dfebd5962987bf523a1f2e3b6eed63b482060aab Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:12:01 +0000 Subject: [PATCH] Update comments in settings logic (#12148) Follow-up on https://github.com/matrix-org/matrix-react-sdk/pull/12125 --- src/settings/Settings.tsx | 6 +++--- src/settings/SettingsStore.ts | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index a0f7eb2779..18a5ecb9ab 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -127,9 +127,9 @@ export interface IBaseSetting { /** * If true, then the presence of this setting in `config.json` will disable the option in the UI. * - * In other words, we prevent the user overriding the setting if an explicit value is given in `config.json`; - * though note that users who have already set a non-default value before `config.json` is update will continue - * to use that value (and, indeed, won't be able to change it!) + * In other words, we prevent the user overriding the setting if an explicit value is given in `config.json`. + * XXX: note that users who have already set a non-default value before `config.json` is update will continue + * to use that value (and, indeed, won't be able to change it!): https://github.com/element-hq/element-web/issues/26877 * * Obviously, this only really makes sense if `supportedLevels` includes {@link SettingLevel.CONFIG}. */ diff --git a/src/settings/SettingsStore.ts b/src/settings/SettingsStore.ts index 6470289299..7b1b6493d0 100644 --- a/src/settings/SettingsStore.ts +++ b/src/settings/SettingsStore.ts @@ -528,7 +528,8 @@ export default class SettingsStore { return false; } - // When non-beta features are specified in the config.json, we force them as enabled or disabled. + // For some config settings (mostly: non-beta features), a value in config.json overrides the local setting + // (ie: we force them as enabled or disabled). if (SETTINGS[settingName]?.configDisablesSetting) { const configVal = SettingsStore.getValueAt(SettingLevel.CONFIG, settingName, roomId, true, true); if (configVal === true || configVal === false) return false;