mirror of
https://github.com/nextcloud/passman.git
synced 2025-12-11 14:16:07 +08:00
OCA\Passman\Notifier: setIcon()
Set the icon for the notification. Signed-off-by: Raymond Hackley <raymondhackley@protonmail.com>
This commit is contained in:
parent
fcc5a29733
commit
d1accd8788
1 changed files with 7 additions and 0 deletions
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
namespace OCA\Passman;
|
||||
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\L10N\IFactory;
|
||||
use OCP\Notification\INotification;
|
||||
use OCP\Notification\INotifier;
|
||||
|
|
@ -31,6 +32,7 @@ class Notifier implements INotifier {
|
|||
|
||||
public function __construct(
|
||||
protected IFactory $factory,
|
||||
protected IURLGenerator $url,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
@ -47,6 +49,11 @@ class Notifier implements INotifier {
|
|||
// Read the language from the notification
|
||||
$l = $this->factory->get('passman', $languageCode);
|
||||
|
||||
// Set the icon for the notification
|
||||
$notification->setIcon(
|
||||
$this->url->getAbsoluteURL($this->url->imagePath('passman', 'app-dark.svg'))
|
||||
);
|
||||
|
||||
switch ($notification->getSubject()) {
|
||||
// Deal with known subjects
|
||||
case 'credential_expired':
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue