Skip to content

Commit

Permalink
fixed initialization of theming service (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
memurats authored Jun 26, 2024
1 parent 9da8b6b commit 6016c99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
Expand Down
4 changes: 3 additions & 1 deletion lib/Service/NMCThemesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -59,6 +60,7 @@ class NMCThemesService extends ThemesService {
public function __construct(
IUserSession $userSession,
IConfig $config,
LoggerInterface $logger,
ITheme $default,
array $selectableThemes,
array $staticThemes,
Expand All @@ -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;
Expand Down

0 comments on commit 6016c99

Please sign in to comment.