diff options
author | Daniel <mail@danielkesselberg.de> | 2024-09-30 12:42:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-30 12:42:29 +0200 |
commit | be87dec2d9a5f8ab311651c25a22d871a567d2d1 (patch) | |
tree | 1f59175f49a6fba495db14d9e8e0320f66755771 /apps | |
parent | 54cdd42ba93229626aade5e56f5050af657ed8c6 (diff) | |
parent | 60083b1b5f30a2c1b0e59d3eeac7dd869c86c034 (diff) | |
download | nextcloud-server-be87dec2d9a5f8ab311651c25a22d871a567d2d1.tar.gz nextcloud-server-be87dec2d9a5f8ab311651c25a22d871a567d2d1.zip |
Merge pull request #48439 from nextcloud/fix/background-image
fix(theming): Use `AppConfig` for setting background image
Diffstat (limited to 'apps')
-rw-r--r-- | apps/theming/lib/Service/BackgroundService.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/theming/lib/Service/BackgroundService.php b/apps/theming/lib/Service/BackgroundService.php index bf650874448..d403e77635c 100644 --- a/apps/theming/lib/Service/BackgroundService.php +++ b/apps/theming/lib/Service/BackgroundService.php @@ -18,6 +18,7 @@ use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OCP\Files\SimpleFS\ISimpleFile; use OCP\Files\SimpleFS\ISimpleFolder; +use OCP\IAppConfig; use OCP\IConfig; use OCP\Lock\LockedException; use OCP\PreConditionNotMetException; @@ -200,6 +201,7 @@ class BackgroundService { public function __construct( private IRootFolder $rootFolder, private IAppData $appData, + private IAppConfig $appConfig, private IConfig $config, private ?string $userId, ) { @@ -328,7 +330,7 @@ class BackgroundService { if ($handle && $image->loadFromFileHandle($handle) !== false) { $meanColor = $this->calculateMeanColor($image); if ($meanColor !== false) { - $this->config->setAppValue(Application::APP_ID, 'background_color', $meanColor); + $this->appConfig->setValueString(Application::APP_ID, 'background_color', $meanColor); return $meanColor; } } |