Stop using deprecated registerNotifier, use registerNotifierService instead
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
parent
a6f792616c
commit
c5147529af
|
@ -248,20 +248,14 @@ class Application extends App {
|
||||||
return $this->getContainer()->query(SyncService::class);
|
return $this->getContainer()->query(SyncService::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerNotifier() {
|
public function registerNotifier():void {
|
||||||
$this->getContainer()->getServer()->getNotificationManager()->registerNotifier(function() {
|
$this->getContainer()
|
||||||
return $this->getContainer()->query(Notifier::class);
|
->getServer()
|
||||||
}, function() {
|
->getNotificationManager()
|
||||||
$l = $this->getContainer()->getServer()->getL10NFactory()->get(self::APP_ID);
|
->registerNotifierService(Notifier::class);
|
||||||
return [
|
|
||||||
'id' => self::APP_ID,
|
|
||||||
'name' => $l->t('Calendars and Contacts'),
|
|
||||||
];
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerCalendarReminders(): void
|
public function registerCalendarReminders():void {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
/** @var NotificationProviderManager $notificationProviderManager */
|
/** @var NotificationProviderManager $notificationProviderManager */
|
||||||
$notificationProviderManager = $this->getContainer()->query(NotificationProviderManager::class);
|
$notificationProviderManager = $this->getContainer()->query(NotificationProviderManager::class);
|
||||||
|
|
Loading…
Reference in New Issue