Refactor helper drift in lib: centralize theme/translation and remove app() hotspots

This commit is contained in:
2026-03-19 08:23:14 +01:00
parent 5da506a20f
commit 5739cc1200
24 changed files with 197 additions and 88 deletions

View File

@@ -269,11 +269,6 @@ class SsoUserLinkService
private function resolveInitialTheme(?string $theme): string
{
$theme = strtolower(trim((string) ($theme ?? '')));
$themes = function_exists('appThemes') ? appThemes() : ['light' => 'Light'];
if ($theme !== '' && isset($themes[$theme])) {
return $theme;
}
return isset($themes['light']) ? 'light' : (string) array_key_first($themes);
return $this->settingsGateway->normalizeTheme($theme);
}
}