UI Feature Flag: Communities

This commit is contained in:
Michael Telatynski 2020-09-16 12:55:04 +01:00
parent 9cc789756b
commit 2bea8457e9
6 changed files with 31 additions and 9 deletions

View file

@ -257,6 +257,11 @@ export default class SettingsStore {
return SETTINGS[settingName].isFeature;
}
public static isEnabled(settingName: string) {
if (!SETTINGS[settingName]) return false;
return SETTINGS[settingName].controller ? !SETTINGS[settingName].controller.settingDisabled : true;
}
/**
* Gets the value of a setting. The room ID is optional if the setting is not to
* be applied to any particular room, otherwise it should be supplied.