diff --git a/lib/Listener/LoadContactsFilesActions.php b/lib/Listener/LoadContactsFilesActions.php index 481867009..1b75a77c1 100644 --- a/lib/Listener/LoadContactsFilesActions.php +++ b/lib/Listener/LoadContactsFilesActions.php @@ -17,18 +17,11 @@ class LoadContactsFilesActions implements IEventListener { public function handle(Event $event): void { - if (!($event instanceof LoadAdditionalScriptsEvent)) { + if (!$event instanceof LoadAdditionalScriptsEvent) { return; } - Util::addStyle(Application::APP_ID, 'contacts-index'); Util::addStyle(Application::APP_ID, 'contacts-files-action'); - - // only available since Nc 28 - if (method_exists(Util::class, 'addInitScript')) { - Util::addInitScript(Application::APP_ID, 'contacts-files-action'); - } else { - Util::addScript(Application::APP_ID, 'contacts-files-action', 'files'); - } + Util::addInitScript(Application::APP_ID, 'contacts-files-action'); } }