mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 19:26:04 +03:00
Add isEnabled comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
189233447b
commit
cf7b4dd311
1 changed files with 6 additions and 0 deletions
|
@ -257,6 +257,12 @@ export default class SettingsStore {
|
|||
return SETTINGS[settingName].isFeature;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a setting is enabled.
|
||||
* If a setting is disabled then it should be hidden from the user.
|
||||
* @param {string} settingName The setting to look up.
|
||||
* @return {boolean} True if the setting is enabled.
|
||||
*/
|
||||
public static isEnabled(settingName: string) {
|
||||
if (!SETTINGS[settingName]) return false;
|
||||
return SETTINGS[settingName].controller ? !SETTINGS[settingName].controller.settingDisabled : true;
|
||||
|
|
Loading…
Reference in a new issue