@@ -61,7 +61,8 @@ class ThemingDefaults extends \OC_Defaults {
61
61
private string $ entity ;
62
62
private string $ productName ;
63
63
private string $ url ;
64
- private string $ color ;
64
+ private string $ backgroundColor ;
65
+ private string $ primaryColor ;
65
66
private string $ docBaseUrl ;
66
67
67
68
private string $ iTunesAppId ;
@@ -91,7 +92,8 @@ public function __construct(
91
92
$ this ->entity = parent ::getEntity ();
92
93
$ this ->productName = parent ::getProductName ();
93
94
$ this ->url = parent ::getBaseUrl ();
94
- $ this ->color = parent ::getColorPrimary ();
95
+ $ this ->primaryColor = parent ::getColorPrimary ();
96
+ $ this ->backgroundColor = parent ::getColorBackground ();
95
97
$ this ->iTunesAppId = parent ::getiTunesAppId ();
96
98
$ this ->iOSClientUrl = parent ::getiOSClientUrl ();
97
99
$ this ->AndroidClientUrl = parent ::getAndroidClientUrl ();
@@ -260,25 +262,20 @@ public function getDefaultColorPrimary(): string {
260
262
return $ defaultColor ;
261
263
}
262
264
263
- // Fall back to background color
264
- $ defaultColor = $ this ->config ->getAppValue (Application::APP_ID , 'background_color ' , '' );
265
- if (preg_match ('/^\#([0-9a-f]{3}|[0-9a-f]{6})$/i ' , $ defaultColor )) {
266
- return $ defaultColor ;
267
- }
268
-
269
- // worst case fall back to default primary color
270
- return BackgroundService::DEFAULT_COLOR ;
265
+ // fall back to default primary color
266
+ return $ this ->primaryColor ;
271
267
}
272
268
273
269
/**
274
270
* Default background color only taking admin setting into account
275
271
*/
276
272
public function getDefaultColorBackground (): string {
277
273
$ defaultColor = $ this ->config ->getAppValue (Application::APP_ID , 'background_color ' , '' );
278
- if (! preg_match ('/^\#([0-9a-f]{3}|[0-9a-f]{6})$/i ' , $ defaultColor )) {
279
- $ defaultColor = BackgroundService:: DEFAULT_BACKGROUND_COLOR ;
274
+ if (preg_match ('/^\#([0-9a-f]{3}|[0-9a-f]{6})$/i ' , $ defaultColor )) {
275
+ return $ defaultColor ;
280
276
}
281
- return $ defaultColor ;
277
+
278
+ return $ this ->backgroundColor ;
282
279
}
283
280
284
281
/**
0 commit comments