diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-02 21:52:39 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-02 23:11:56 +0300 |
commit | bc961baa40ef93b53562bd6d1de74de70fba9e8d (patch) | |
tree | 6725196d966ab0aa1f0946cf474089fbb37ad6a8 /apps/files_sharing/lib | |
parent | 3b5c8d792dc0986a749e0b23022d48d20a5f2d6c (diff) |
Move some settings over to the IInitialState
The old one has been deprecated. Part one of many.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/Settings/Personal.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/Settings/Personal.php b/apps/files_sharing/lib/Settings/Personal.php index bfca0b46e07..c265a279393 100644 --- a/apps/files_sharing/lib/Settings/Personal.php +++ b/apps/files_sharing/lib/Settings/Personal.php @@ -29,20 +29,20 @@ namespace OCA\Files_Sharing\Settings; use OCA\Files_Sharing\AppInfo\Application; use OCP\AppFramework\Http\TemplateResponse; +use OCP\AppFramework\Services\IInitialState; use OCP\IConfig; -use OCP\IInitialStateService; use OCP\Settings\ISettings; class Personal implements ISettings { /** @var IConfig */ private $config; - /** @var IInitialStateService */ + /** @var IInitialState */ private $initialState; /** @var string */ private $userId; - public function __construct(IConfig $config, IInitialStateService $initialState, string $userId) { + public function __construct(IConfig $config, IInitialState $initialState, string $userId) { $this->config = $config; $this->initialState = $initialState; $this->userId = $userId; @@ -52,8 +52,8 @@ class Personal implements ISettings { $defaultAcceptSystemConfig = $this->config->getSystemValueBool('sharing.enable_share_accept', false) ? 'no' : 'yes'; $acceptDefault = $this->config->getUserValue($this->userId, Application::APP_ID, 'default_accept', $defaultAcceptSystemConfig) === 'yes'; $enforceAccept = $this->config->getSystemValueBool('sharing.force_share_accept', false); - $this->initialState->provideInitialState(Application::APP_ID, 'accept_default', $acceptDefault); - $this->initialState->provideInitialState(Application::APP_ID, 'enforce_accept', $enforceAccept); + $this->initialState->provideInitialState('accept_default', $acceptDefault); + $this->initialState->provideInitialState('enforce_accept', $enforceAccept); return new TemplateResponse('files_sharing', 'Settings/personal'); } |