From 6016c99b240e67f57eea629786a7bb1c997fe457 Mon Sep 17 00:00:00 2001 From: Mauro Mura Date: Wed, 26 Jun 2024 16:40:34 +0200 Subject: [PATCH] fixed initialization of theming service (#355) --- lib/AppInfo/Application.php | 1 + lib/Service/NMCThemesService.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 69bd3b2a..78eac18e 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -220,6 +220,7 @@ public function register(IRegistrationContext $context): void { return new NMCThemesService( $c->get(IUserSession::class), $c->get(IConfig::class), + $c->get(LoggerInterface::class), $c->get(Magenta::class), [$c->get(MagentaLight::class), $c->get(MagentaDark::class)], [$c->get(TeleNeoWebFont::class)], diff --git a/lib/Service/NMCThemesService.php b/lib/Service/NMCThemesService.php index b0b213b2..f49b3345 100644 --- a/lib/Service/NMCThemesService.php +++ b/lib/Service/NMCThemesService.php @@ -23,6 +23,7 @@ use OCA\Theming\Themes\LightTheme; use OCP\IConfig; use OCP\IUserSession; +use Psr\Log\LoggerInterface; /** * An alternative ThemesService with the following properties: @@ -59,6 +60,7 @@ class NMCThemesService extends ThemesService { public function __construct( IUserSession $userSession, IConfig $config, + LoggerInterface $logger, ITheme $default, array $selectableThemes, array $staticThemes, @@ -68,7 +70,7 @@ public function __construct( HighContrastTheme $highContrastTheme, DarkHighContrastTheme $darkHighContrastTheme, DyslexiaFont $dyslexiaFont) { - parent::__construct($userSession, $config, $defaultTheme, $lightTheme, + parent::__construct($userSession, $config, $logger, $defaultTheme, $lightTheme, $darkTheme, $highContrastTheme, $darkHighContrastTheme, $dyslexiaFont); $this->userSession = $userSession;