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