Skip to content
Snippets Groups Projects
Unverified Commit c8427781 authored by Robin Appelman's avatar Robin Appelman
Browse files

implement old settings interface


Signed-off-by: default avatarRobin Appelman <robin@icewind.nl>
parent 5eb1e75e
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment