3434use OCA \Theming \ITheme ;
3535use OCA \Theming \Service \BackgroundService ;
3636use OCA \Theming \Service \ThemesService ;
37+ use OCA \Theming \ThemingDefaults ;
3738use OCP \AppFramework \Http ;
3839use OCP \AppFramework \Http \DataResponse ;
3940use OCP \AppFramework \Http \FileDisplayResponse ;
@@ -53,6 +54,7 @@ class UserThemeController extends OCSController {
5354 private IConfig $ config ;
5455 private IUserSession $ userSession ;
5556 private ThemesService $ themesService ;
57+ private ThemingDefaults $ themingDefaults ;
5658 private BackgroundService $ backgroundService ;
5759
5860 /**
@@ -63,11 +65,13 @@ public function __construct(string $appName,
6365 IConfig $ config ,
6466 IUserSession $ userSession ,
6567 ThemesService $ themesService ,
68+ ThemingDefaults $ themingDefaults ,
6669 BackgroundService $ backgroundService ) {
6770 parent ::__construct ($ appName , $ request );
6871 $ this ->config = $ config ;
6972 $ this ->userSession = $ userSession ;
7073 $ this ->themesService = $ themesService ;
74+ $ this ->themingDefaults = $ themingDefaults ;
7175 $ this ->backgroundService = $ backgroundService ;
7276 $ this ->userId = $ userSession ->getUser ()->getUID ();
7377 }
@@ -177,6 +181,8 @@ public function setBackground(string $type = 'default', string $value = ''): JSO
177181 }
178182 $ currentVersion ++;
179183 $ this ->config ->setUserValue ($ this ->userId , Application::APP_ID , 'backgroundVersion ' , (string )$ currentVersion );
184+ // FIXME replace with user-specific cachebuster increase https://github.com/nextcloud/server/issues/34472
185+ $ this ->themingDefaults ->increaseCacheBuster ();
180186 return new JSONResponse ([
181187 'type ' => $ type ,
182188 'value ' => $ value ,
0 commit comments