Refactor helper drift in lib: centralize theme/translation and remove app() hotspots
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user