aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-08-15 19:18:01 +0200
committerVincent Petry <vincent@nextcloud.com>2022-08-15 19:20:42 +0200
commitfbc48db507f811bef3c094e446e89d3f3162e616 (patch)
treea9e9532c85ab1640c043f4726f5baa6eb546937b /apps/files
parentcb97e8f15c75cc46e345ebfc79dcad1b9c48bd01 (diff)
downloadnextcloud-server-fbc48db507f811bef3c094e446e89d3f3162e616.tar.gz
nextcloud-server-fbc48db507f811bef3c094e446e89d3f3162e616.zip
Remove redundant events
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Controller/ViewController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index 587f75f3f02..82f56be9f18 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -46,6 +46,7 @@ use OCP\AppFramework\Http\RedirectResponse;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
+use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as ResourcesLoadAdditionalScriptsEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
@@ -294,6 +295,7 @@ class ViewController extends Controller {
];
}
+ $this->eventDispatcher->dispatchTyped(new ResourcesLoadAdditionalScriptsEvent());
$event = new LoadAdditionalScriptsEvent();
$this->eventDispatcher->dispatchTyped($event);
$this->eventDispatcher->dispatchTyped(new LoadSidebar());
@@ -301,6 +303,7 @@ class ViewController extends Controller {
if (class_exists(LoadViewer::class)) {
$this->eventDispatcher->dispatchTyped(new LoadViewer());
}
+
$this->initialState->provideInitialState('templates_path', $this->templateManager->hasTemplateDirectory() ? $this->templateManager->getTemplatePath() : false);
$this->initialState->provideInitialState('templates', $this->templateManager->listCreators());