diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-08-05 07:51:24 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-08-05 17:03:38 +0200 |
commit | d9dcd59ae1ea258f57fe4a92eaea6f4ba63f54c8 (patch) | |
tree | 123a6a8187ab357f8717853cff4b7925c3fb1e02 /apps/dashboard/lib | |
parent | 018be662f4df89345b528382ab300269d4a88048 (diff) | |
download | nextcloud-server-d9dcd59ae1ea258f57fe4a92eaea6f4ba63f54c8.tar.gz nextcloud-server-d9dcd59ae1ea258f57fe4a92eaea6f4ba63f54c8.zip |
Load sidebar on dashboard
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/dashboard/lib')
-rw-r--r-- | apps/dashboard/lib/Controller/DashboardController.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/dashboard/lib/Controller/DashboardController.php b/apps/dashboard/lib/Controller/DashboardController.php index 07cfaf071e2..d7f9453cb4e 100644 --- a/apps/dashboard/lib/Controller/DashboardController.php +++ b/apps/dashboard/lib/Controller/DashboardController.php @@ -27,6 +27,7 @@ declare(strict_types=1); namespace OCA\Dashboard\Controller; use OCA\Dashboard\AppInfo\Application; +use OCA\Files\Event\LoadSidebar; use OCA\Viewer\Event\LoadViewer; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; @@ -76,6 +77,11 @@ class DashboardController extends Controller { * @return TemplateResponse */ public function index(): TemplateResponse { + $this->eventDispatcher->dispatchTyped(new LoadSidebar()); + if (class_exists(LoadViewer::class)) { + $this->eventDispatcher->dispatchTyped(new LoadViewer()); + } + $this->eventDispatcher->dispatchTyped(new RegisterWidgetEvent($this->dashboardManager)); $userLayout = explode(',', $this->config->getUserValue($this->userId, 'dashboard', 'layout', 'recommendations,spreed,mail,calendar')); @@ -92,10 +98,6 @@ class DashboardController extends Controller { $this->inititalStateService->provideInitialState('dashboard', 'firstRun', $this->config->getUserValue($this->userId, 'dashboard', 'firstRun', '1') === '1'); $this->config->setUserValue($this->userId, 'dashboard', 'firstRun', '0'); - if (class_exists(LoadViewer::class)) { - $this->eventDispatcher->dispatchTyped(new LoadViewer()); - } - return new TemplateResponse('dashboard', 'index'); } |