Skip to content

Commit b17aa33

Browse files
committed
fix: reuse saved identify method defaults
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent bd14ba0 commit b17aa33

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

lib/Service/IdentifyMethod/Account.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
namespace OCA\Libresign\Service\IdentifyMethod;
1010

11-
use OCA\Libresign\AppInfo\Application;
1211
use OCA\Libresign\Db\IdentifyMethodMapper;
1312
use OCA\Libresign\Exception\LibresignException;
1413
use OCA\Libresign\Helper\JSActions;
@@ -161,10 +160,7 @@ public function getSettings(): array {
161160
}
162161

163162
private function isEnabledByDefault(): bool {
164-
$config = $this->identifyService->getAppConfig()->getValueArray(Application::APP_ID, 'identify_methods', []);
165-
if (json_last_error() !== JSON_ERROR_NONE || !is_array($config)) {
166-
return true;
167-
}
163+
$config = $this->identifyService->getSavedSettings();
168164

169165
// Remove not enabled
170166
$config = array_filter($config, fn ($i) => isset($i['enabled']) && $i['enabled'] ? true : false);

0 commit comments

Comments
 (0)