diff options
Diffstat (limited to 'apps/files_sharing/lib/AppInfo')
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index d89419b8ea9..b76239dc00d 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -116,11 +116,6 @@ class Application extends App implements IBootstrap { Share::registerBackend('file', File::class); Share::registerBackend('folder', Folder::class, 'file'); - - /** - * Always add main sharing script - */ - Util::addScript(self::APP_ID, 'main'); } @@ -139,6 +134,12 @@ class Application extends App implements IBootstrap { $dispatcher->addListener(ResourcesLoadAdditionalScriptsEvent::class, function () { \OCP\Util::addScript('files_sharing', 'collaboration'); }); + $dispatcher->addListener(\OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent::class, function () { + /** + * Always add main sharing script + */ + Util::addScript(self::APP_ID, 'main'); + }); // notifications api to accept incoming user shares $dispatcher->addListener(ShareCreatedEvent::class, function (ShareCreatedEvent $event) { |