aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-08-01 09:28:26 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-08-01 11:03:24 +0200
commit80231e60aab2816f7d548b2d59b477ed865bcf9a (patch)
tree6319fdb10437fdf4285612ebc560d195f986049b /apps
parentc52b7e5ebc6736de2d9991af379e4ed9885aab7b (diff)
downloadnextcloud-server-80231e60aab2816f7d548b2d59b477ed865bcf9a.tar.gz
nextcloud-server-80231e60aab2816f7d548b2d59b477ed865bcf9a.zip
fix(activity): regroup Files and spltit sharing activity
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/comments/lib/Activity/Setting.php12
-rw-r--r--apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php4
-rw-r--r--apps/systemtags/lib/Activity/Setting.php30
3 files changed, 31 insertions, 15 deletions
diff --git a/apps/comments/lib/Activity/Setting.php b/apps/comments/lib/Activity/Setting.php
index cc7c47784ac..9315aedc104 100644
--- a/apps/comments/lib/Activity/Setting.php
+++ b/apps/comments/lib/Activity/Setting.php
@@ -5,10 +5,10 @@
*/
namespace OCA\Comments\Activity;
-use OCP\Activity\ISetting;
+use OCP\Activity\ActivitySettings;
use OCP\IL10N;
-class Setting implements ISetting {
+class Setting extends ActivitySettings {
public function __construct(
protected IL10N $l,
) {
@@ -22,6 +22,14 @@ class Setting implements ISetting {
return $this->l->t('<strong>Comments</strong> for files');
}
+ public function getGroupIdentifier() {
+ return 'files';
+ }
+
+ public function getGroupName() {
+ return $this->l->t('Files');
+ }
+
public function getPriority(): int {
return 50;
}
diff --git a/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php b/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php
index 5a46a5cbd02..e8547324f24 100644
--- a/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php
+++ b/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php
@@ -23,10 +23,10 @@ abstract class ShareActivitySettings extends ActivitySettings {
}
public function getGroupIdentifier() {
- return 'files';
+ return 'sharing';
}
public function getGroupName() {
- return $this->l->t('Files');
+ return $this->l->t('Sharing');
}
}
diff --git a/apps/systemtags/lib/Activity/Setting.php b/apps/systemtags/lib/Activity/Setting.php
index 92e9ee66392..5f03d348235 100644
--- a/apps/systemtags/lib/Activity/Setting.php
+++ b/apps/systemtags/lib/Activity/Setting.php
@@ -5,19 +5,11 @@
*/
namespace OCA\SystemTags\Activity;
-use OCP\Activity\ISetting;
+use OCP\Activity\ActivitySettings;
use OCP\IL10N;
-class Setting implements ISetting {
-
- /** @var IL10N */
- protected $l;
-
- /**
- * @param IL10N $l
- */
- public function __construct(IL10N $l) {
- $this->l = $l;
+class Setting extends ActivitySettings {
+ public function __construct(protected IL10N $l) {
}
/**
@@ -37,6 +29,22 @@ class Setting implements ISetting {
}
/**
+ * @return string Lowercase a-z and underscore only group identifier
+ * @since 20.0.0
+ */
+ public function getGroupIdentifier() {
+ return 'files';
+ }
+
+ /**
+ * @return string A translated string for the settings group
+ * @since 20.0.0
+ */
+ public function getGroupName() {
+ return $this->l->t('Files');
+ }
+
+ /**
* @return int whether the filter should be rather on the top or bottom of
* the admin section. The filters are arranged in ascending order of the
* priority values. It is required to return a value between 0 and 100.