summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-01-22 15:36:57 +0100
committerBackportbot <backportbot-noreply@rullzer.com>2019-01-24 13:46:53 +0000
commitd343873e7c213cfe6039d846d64913040e0e6c37 (patch)
tree265d776d7d3c6f5eddb38af53625b127df80f912 /apps/files
parent266938da408834cf4a9ad278b878a3f1c1ce1579 (diff)
downloadnextcloud-server-d343873e7c213cfe6039d846d64913040e0e6c37.tar.gz
nextcloud-server-d343873e7c213cfe6039d846d64913040e0e6c37.zip
Add icon to restore activity
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Activity/Provider.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php
index e868e1c464a..469c26cb47f 100644
--- a/apps/files/lib/Activity/Provider.php
+++ b/apps/files/lib/Activity/Provider.php
@@ -113,11 +113,11 @@ class Provider implements IProvider {
return $this->parseLongVersion($event, $previousEvent);
}
- protected function setIcon(IEvent $event, $icon) {
+ protected function setIcon(IEvent $event, string $icon, string $app = 'files') {
if ($this->activityManager->getRequirePNG()) {
- $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('files', $icon . '.png')));
+ $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath($app, $icon . '.png')));
} else {
- $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('files', $icon . '.svg')));
+ $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath($app, $icon . '.svg')));
}
}
@@ -142,6 +142,7 @@ class Provider implements IProvider {
$this->setIcon($event, 'delete-color');
} else if ($event->getSubject() === 'restored_by') {
$subject = $this->l->t('Restored by {user}');
+ $this->setIcon($event, 'actions/history', 'core');
} else if ($event->getSubject() === 'renamed_by') {
$subject = $this->l->t('Renamed by {user}');
$this->setIcon($event, 'change');
@@ -214,8 +215,10 @@ class Provider implements IProvider {
$this->setIcon($event, 'delete-color');
} else if ($event->getSubject() === 'restored_self') {
$subject = $this->l->t('You restored {file}');
+ $this->setIcon($event, 'actions/history', 'core');
} else if ($event->getSubject() === 'restored_by') {
$subject = $this->l->t('{user} restored {file}');
+ $this->setIcon($event, 'actions/history', 'core');
} else if ($event->getSubject() === 'renamed_self') {
$subject = $this->l->t('You renamed {oldfile} to {newfile}');
$this->setIcon($event, 'change');