瀏覽代碼

Stop using deprecated registerNotifier, use registerNotifierService instead

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
tags/v17.0.0beta1
Georg Ehrke 4 年之前
父節點
當前提交
c5147529af
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 6 行新增12 行删除
  1. 6
    12
      apps/dav/lib/AppInfo/Application.php

+ 6
- 12
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);

Loading…
取消
儲存