mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
implement old settings interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
5eb1e75e24
commit
c8427781b4
2 changed files with 26 additions and 4 deletions
|
|
@ -271,9 +271,11 @@ class Manager implements IManager {
|
|||
/** @var ISetting $setting */
|
||||
$setting = \OC::$server->query($class);
|
||||
|
||||
if ($setting instanceof ISetting) {
|
||||
$setting = new ActivitySettingsAdapter($setting);
|
||||
} elseif (!$setting instanceof ActivitySettings) {
|
||||
if (!$setting instanceof ISetting) {
|
||||
if (!$setting instanceof ActivitySettings) {
|
||||
$setting = new ActivitySettingsAdapter($setting);
|
||||
}
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Invalid activity filter registered');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace OCP\Activity;
|
|||
/**
|
||||
* @since 20.0.0
|
||||
*/
|
||||
abstract class ActivitySettings {
|
||||
abstract class ActivitySettings implements ISetting {
|
||||
/**
|
||||
* @return string Lowercase a-z and underscore only identifier
|
||||
* @since 20.0.0
|
||||
|
|
@ -78,4 +78,24 @@ abstract class ActivitySettings {
|
|||
public function isDefaultEnabledNotification() {
|
||||
return $this->isDefaultEnabledMail() && !$this->canChangeMail();
|
||||
}
|
||||
|
||||
/**
|
||||
* Left in for backwards compatibility
|
||||
*
|
||||
* @return bool
|
||||
* @since 20.0.0
|
||||
*/
|
||||
public function canChangeStream() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Left in for backwards compatibility
|
||||
*
|
||||
* @return bool
|
||||
* @since 20.0.0
|
||||
*/
|
||||
public function isDefaultEnabledStream() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue