mirror of https://github.com/vector-im/riot-web
Add isEnabled comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
189233447b
commit
cf7b4dd311
|
@ -257,6 +257,12 @@ export default class SettingsStore {
|
||||||
return SETTINGS[settingName].isFeature;
|
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) {
|
public static isEnabled(settingName: string) {
|
||||||
if (!SETTINGS[settingName]) return false;
|
if (!SETTINGS[settingName]) return false;
|
||||||
return SETTINGS[settingName].controller ? !SETTINGS[settingName].controller.settingDisabled : true;
|
return SETTINGS[settingName].controller ? !SETTINGS[settingName].controller.settingDisabled : true;
|
||||||
|
|
Loading…
Reference in New Issue