summaryrefslogtreecommitdiffstats
path: root/apps/files_reminders/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_reminders/lib')
-rw-r--r--apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php
index 9eadc518851..1e7f63d8e0d 100644
--- a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php
+++ b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php
@@ -28,16 +28,25 @@ namespace OCA\FilesReminders\Listener;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\FilesReminders\AppInfo\Application;
+use OCP\App\IAppManager;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Util;
class LoadAdditionalScriptsListener implements IEventListener {
+ public function __construct(
+ private IAppManager $appManager,
+ ) {}
+
public function handle(Event $event): void {
if (!($event instanceof LoadAdditionalScriptsEvent)) {
return;
}
+ if (!$this->appManager->isEnabledForUser('notifications')) {
+ return;
+ }
+
Util::addScript(Application::APP_ID, 'main');
}
}