mirror of
https://github.com/nextcloud/server.git
synced 2026-04-27 01:00:20 -04:00
fix(activity): regroup Files and spltit sharing activity
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
parent
c52b7e5ebc
commit
80231e60aa
4 changed files with 35 additions and 21 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -36,6 +28,22 @@ class Setting implements ISetting {
|
|||
return $this->l->t('<strong>System tags</strong> for a file have been modified');
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
|
|
|||
|
|
@ -17,12 +17,10 @@ use OCP\IL10N;
|
|||
* class based one
|
||||
*/
|
||||
class ActivitySettingsAdapter extends ActivitySettings {
|
||||
private $oldSettings;
|
||||
private $l10n;
|
||||
|
||||
public function __construct(ISetting $oldSettings, IL10N $l10n) {
|
||||
$this->oldSettings = $oldSettings;
|
||||
$this->l10n = $l10n;
|
||||
public function __construct(
|
||||
private ISetting $oldSettings,
|
||||
private IL10N $l10n
|
||||
) {
|
||||
}
|
||||
|
||||
public function getIdentifier() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue