Make isImaginaryEnabled an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-19 12:04:24 +01:00
parent 4203078701
commit 16ce71412f
5 changed files with 10 additions and 24 deletions

View file

@ -93,6 +93,11 @@ class ConfigurationManager
set { $this->set('isTalkRecordingEnabled', $this->isTalkEnabled && $value); }
}
public bool $isImaginaryEnabled {
get => $this->get('isImaginaryEnabled', true);
set { $this->set('isImaginaryEnabled', $value); }
}
public function GetConfig() : array
{
if ($this->config === [] && file_exists(DataConst::GetConfigFile()))
@ -228,21 +233,6 @@ class ConfigurationManager
}
}
public function isImaginaryEnabled() : bool {
$config = $this->GetConfig();
if (isset($config['isImaginaryEnabled']) && $config['isImaginaryEnabled'] === 0) {
return false;
} else {
return true;
}
}
public function SetImaginaryEnabledState(int $value) : void {
$config = $this->GetConfig();
$config['isImaginaryEnabled'] = $value;
$this->WriteConfig($config);
}
public function isFulltextsearchEnabled() : bool {
$config = $this->GetConfig();
if (isset($config['isFulltextsearchEnabled']) && $config['isFulltextsearchEnabled'] === 1) {