Highlight the app name in the notification

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2016-12-01 15:33:13 +01:00
parent 917cac5436
commit 1aefbed55f
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
2 changed files with 26 additions and 1 deletions

View File

@ -84,7 +84,14 @@ class Notifier implements INotifier {
$this->updateAlreadyInstalledCheck($notification, $this->appVersions[$notification->getObjectType()]);
}
$notification->setParsedSubject($l->t('Update for %1$s to version %2$s is available.', [$appName, $notification->getObjectId()]));
$notification->setParsedSubject($l->t('Update for %1$s to version %2$s is available.', [$appName, $notification->getObjectId()]))
->setRichSubject($l->t('Update for {app} to version %s is available.', $notification->getObjectId()), [
'app' => [
'type' => 'app',
'id' => $notification->getObjectType(),
'name' => $appName,
]
]);
}
$notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('updatenotification', 'notification.svg')));

View File

@ -96,6 +96,24 @@ class Definitions {
],
],
],
'app' => [
'author' => 'Nextcloud',
'app' => 'updatenotification',
'since' => '11.0.0',
'parameters' => [
'id' => [
'since' => '11.0.0',
'required' => true, 'description' => 'The app id',
'example' => 'updatenotification',
],
'name' => [
'since' => '11.0.0',
'required' => true,
'description' => 'The name of the app which should be used in the visual representation',
'example' => 'Update notification',
],
],
],
'calendar' => [
'author' => 'Nextcloud',
'app' => 'dav',