From 9e26af66bf03c60cb0466ed2151c927822c8b560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 12 May 2022 10:53:33 +0200 Subject: [PATCH] Move to OCP\Collaboration\Resources\LoadAdditionalScriptsEvent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- composer.lock | 8 ++++---- lib/Controller/PageController.php | 2 ++ templates/main.php | 3 --- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index 2e4036526..e056ffc6e 100644 --- a/composer.lock +++ b/composer.lock @@ -305,12 +305,12 @@ "source": { "type": "git", "url": "https://github.com/ChristophWurst/nextcloud_composer.git", - "reference": "309ccfab8b7e842df9f17d6389f190411158bd36" + "reference": "6a6fe9467e4427f17b1fade97d6252793fc7a9e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/309ccfab8b7e842df9f17d6389f190411158bd36", - "reference": "309ccfab8b7e842df9f17d6389f190411158bd36", + "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/6a6fe9467e4427f17b1fade97d6252793fc7a9e8", + "reference": "6a6fe9467e4427f17b1fade97d6252793fc7a9e8", "shasum": "" }, "require": { @@ -341,7 +341,7 @@ "issues": "https://github.com/ChristophWurst/nextcloud_composer/issues", "source": "https://github.com/ChristophWurst/nextcloud_composer/tree/master" }, - "time": "2022-07-02T02:10:17+00:00" + "time": "2022-07-06T02:28:38+00:00" }, { "name": "composer/package-versions-deprecated", diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 4fe6b2664..30813bc26 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -29,6 +29,7 @@ use OCA\Files\Event\LoadSidebar; use OCA\Viewer\Event\LoadViewer; use OCP\AppFramework\Http\ContentSecurityPolicy; +use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as CollaborationResourcesEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\IInitialStateService; @@ -88,6 +89,7 @@ public function index() { $this->initialState->provideInitialState(Application::APP_ID, 'config', $this->configService->getAll()); $this->eventDispatcher->dispatchTyped(new LoadSidebar()); + $this->eventDispatcher->dispatchTyped(new CollaborationResourcesEvent()); if (class_exists(LoadViewer::class)) { $this->eventDispatcher->dispatchTyped(new LoadViewer()); } diff --git a/templates/main.php b/templates/main.php index db7c9d93e..d7e20ec63 100644 --- a/templates/main.php +++ b/templates/main.php @@ -24,6 +24,3 @@ OCP\Util::addStyle('deck', 'globalstyles'); OCP\Util::addScript('deck', 'deck-main'); - -\OCP\Server::get(\OC\EventDispatcher\SymfonyAdapter::class) - ->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts');