Skip to content

Commit

Permalink
avoid early DI of IAppManager
Browse files Browse the repository at this point in the history
- might break install

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed Jun 22, 2022
1 parent 5c5c253 commit af4c7fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/private/Dashboard/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ class Manager implements IManager {
private ContainerInterface $serverContainer;
private IAppManager $appManager;

public function __construct(ContainerInterface $serverContainer, IAppManager $appManager) {
public function __construct(ContainerInterface $serverContainer) {
$this->serverContainer = $serverContainer;
$this->appManager = $appManager;
}

private function registerWidget(IWidget $widget): void {
Expand All @@ -64,6 +63,9 @@ public function lazyRegisterWidget(string $widgetClass, string $appId): void {
}

public function loadLazyPanels(): void {
if (!isset($this->appManager)) {
$this->appManager = $this->serverContainer->get(IAppManager::class);
}
$services = $this->lazyWidgets;
foreach ($services as $service) {
try {
Expand Down

0 comments on commit af4c7fa

Please sign in to comment.