Stop using deprecated registerNotifier, use registerNotifierService instead

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2019-08-02 16:40:35 +02:00 committed by Roeland Jago Douma
parent a6f792616c
commit c5147529af
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 6 additions and 12 deletions

View File

@ -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);