aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-09-28 22:44:03 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-09-28 22:44:03 +0200
commit60083b1b5f30a2c1b0e59d3eeac7dd869c86c034 (patch)
treea36d8abf9a94a9a7aa8499b8ead8808188ffbead /apps/theming/lib
parent31ad1c5f552265d3e58496cde85914e58f0e3e2d (diff)
downloadnextcloud-server-60083b1b5f30a2c1b0e59d3eeac7dd869c86c034.tar.gz
nextcloud-server-60083b1b5f30a2c1b0e59d3eeac7dd869c86c034.zip
fix(theming): Use `AppConfig` for setting background imagefix/background-image
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r--apps/theming/lib/Service/BackgroundService.php4
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;
}
}