Show disabled spaces section in preferences regardless

This commit is contained in:
Michael Telatynski 2021-08-11 23:33:10 +01:00
parent 38dbe89316
commit 4f47907abf
4 changed files with 23 additions and 6 deletions

View file

@ -26,7 +26,7 @@ import SettingsStore from "../SettingsStore";
export default class IncompatibleController extends SettingController {
public constructor(
private settingName: string,
private forcedValue = false,
private forcedValue: any = false,
private incompatibleValue: any = true,
) {
super();
@ -44,6 +44,10 @@ export default class IncompatibleController extends SettingController {
return null; // no override
}
public get settingDisabled(): boolean {
return this.incompatibleSetting;
}
public get incompatibleSetting(): boolean {
return SettingsStore.getValue(this.settingName) === this.incompatibleValue;
}