From cf7b4dd3113577a4717e7c8de57928accd8eea04 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 18 Sep 2020 19:09:45 +0100 Subject: [PATCH] Add isEnabled comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/settings/SettingsStore.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/settings/SettingsStore.ts b/src/settings/SettingsStore.ts index 498a2d269d..85d5e1702b 100644 --- a/src/settings/SettingsStore.ts +++ b/src/settings/SettingsStore.ts @@ -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;