Cleanup tasks in the Settings code (#12125)

* inline call to `SettingsStore.isEnabled`

* Remove confusing `SettingsStore.isEnabled`

This was basically the same as `SettingsStore.canSetValue` only more confusing,
so let's get rid of it.

* Add `configDisablesSetting` value for Settings

The current magic where this only works for features (but not beta features!)
is, well, magical. And I need more flexibility here.

* Remove redundant levels constant `LEVELS_FEATURE`

I don't know if this was ever intended to have different semantics to
`LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG`, but if it was, those semantics
shuold have been written down. They now seem to be used entirely
interchangably.
This commit is contained in:
Richard van der Hoff 2024-01-11 09:49:00 +00:00 committed by GitHub
parent c2b5c1fe96
commit 65d6bfe6e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 84 additions and 60 deletions

View file

@ -38,5 +38,5 @@ const E2eAdvancedPanel: React.FC = () => {
export default E2eAdvancedPanel;
export function isE2eAdvancedPanelPossible(): boolean {
return SettingsStore.isEnabled(SETTING_MANUALLY_VERIFY_ALL_SESSIONS);
return SettingsStore.canSetValue(SETTING_MANUALLY_VERIFY_ALL_SESSIONS, null, SettingLevel.DEVICE);
}