From c5147529af4fac3eb8ac7bc4db3d10867600edaf Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Fri, 2 Aug 2019 16:40:35 +0200 Subject: [PATCH] Stop using deprecated registerNotifier, use registerNotifierService instead Signed-off-by: Georg Ehrke --- apps/dav/lib/AppInfo/Application.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 2e3b95d8bf..1c5505d058 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -248,20 +248,14 @@ class Application extends App { return $this->getContainer()->query(SyncService::class); } - public function registerNotifier() { - $this->getContainer()->getServer()->getNotificationManager()->registerNotifier(function() { - return $this->getContainer()->query(Notifier::class); - }, function() { - $l = $this->getContainer()->getServer()->getL10NFactory()->get(self::APP_ID); - return [ - 'id' => self::APP_ID, - 'name' => $l->t('Calendars and Contacts'), - ]; - }); + public function registerNotifier():void { + $this->getContainer() + ->getServer() + ->getNotificationManager() + ->registerNotifierService(Notifier::class); } - public function registerCalendarReminders(): void - { + public function registerCalendarReminders():void { try { /** @var NotificationProviderManager $notificationProviderManager */ $notificationProviderManager = $this->getContainer()->query(NotificationProviderManager::class);