diff options
author | Joas Schilling <coding@schilljs.com> | 2016-12-01 15:32:39 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-12-01 15:36:22 +0100 |
commit | 917cac543637016743f5375ce54c5240b0263130 (patch) | |
tree | 843b27fcbce2bcc7c494e1604ecc80e87767b14d /apps/updatenotification/lib | |
parent | 4ca7f9c896508f14ea2e5d9bdce8c3d986ea05dd (diff) | |
download | nextcloud-server-917cac543637016743f5375ce54c5240b0263130.tar.gz nextcloud-server-917cac543637016743f5375ce54c5240b0263130.zip |
Use the settings icon for the update notification
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/updatenotification/lib')
-rw-r--r-- | apps/updatenotification/lib/Notification/Notifier.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/updatenotification/lib/Notification/Notifier.php b/apps/updatenotification/lib/Notification/Notifier.php index 3e1bc94425f..ccc2c2b6e29 100644 --- a/apps/updatenotification/lib/Notification/Notifier.php +++ b/apps/updatenotification/lib/Notification/Notifier.php @@ -24,6 +24,7 @@ namespace OCA\UpdateNotification\Notification; +use OCP\IURLGenerator; use OCP\L10N\IFactory; use OCP\Notification\IManager; use OCP\Notification\INotification; @@ -31,6 +32,9 @@ use OCP\Notification\INotifier; class Notifier implements INotifier { + /** @var IURLGenerator */ + protected $url; + /** @var IManager */ protected $notificationManager; @@ -43,10 +47,12 @@ class Notifier implements INotifier { /** * Notifier constructor. * + * @param IURLGenerator $url * @param IManager $notificationManager * @param IFactory $l10NFactory */ - public function __construct(IManager $notificationManager, IFactory $l10NFactory) { + public function __construct(IURLGenerator $url, IManager $notificationManager, IFactory $l10NFactory) { + $this->url = $url; $this->notificationManager = $notificationManager; $this->l10NFactory = $l10NFactory; $this->appVersions = $this->getAppVersions(); @@ -81,6 +87,8 @@ class Notifier implements INotifier { $notification->setParsedSubject($l->t('Update for %1$s to version %2$s is available.', [$appName, $notification->getObjectId()])); } + $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('updatenotification', 'notification.svg'))); + return $notification; } |