@@ -120,14 +120,15 @@ public function getFavicon(string $app = 'core'): Response {
120120 } catch (NotFoundException $ e ) {
121121 }
122122 if ($ iconFile === null && $ this ->imageManager ->shouldReplaceIcons ()) {
123+ $ color = $ this ->themingDefaults ->getColorPrimary ();
123124 try {
124- $ iconFile = $ this ->imageManager ->getCachedImage ('favIcon- ' . $ app );
125+ $ iconFile = $ this ->imageManager ->getCachedImage ('favIcon- ' . $ app . $ color );
125126 } catch (NotFoundException $ exception ) {
126127 $ icon = $ this ->iconBuilder ->getFavicon ($ app );
127128 if ($ icon === false || $ icon === '' ) {
128129 return new NotFoundResponse ();
129130 }
130- $ iconFile = $ this ->imageManager ->setCachedImage ('favIcon- ' . $ app , $ icon );
131+ $ iconFile = $ this ->imageManager ->setCachedImage ('favIcon- ' . $ app . $ color , $ icon );
131132 }
132133 $ response = new FileDisplayResponse ($ iconFile , Http::STATUS_OK , ['Content-Type ' => 'image/x-icon ' ]);
133134 }
@@ -157,14 +158,15 @@ public function getTouchIcon(string $app = 'core'): Response {
157158 } catch (NotFoundException $ e ) {
158159 }
159160 if ($ this ->imageManager ->shouldReplaceIcons ()) {
161+ $ color = $ this ->themingDefaults ->getColorPrimary ();
160162 try {
161- $ iconFile = $ this ->imageManager ->getCachedImage ('touchIcon- ' . $ app );
163+ $ iconFile = $ this ->imageManager ->getCachedImage ('touchIcon- ' . $ app . $ color );
162164 } catch (NotFoundException $ exception ) {
163165 $ icon = $ this ->iconBuilder ->getTouchIcon ($ app );
164166 if ($ icon === false || $ icon === '' ) {
165167 return new NotFoundResponse ();
166168 }
167- $ iconFile = $ this ->imageManager ->setCachedImage ('touchIcon- ' . $ app , $ icon );
169+ $ iconFile = $ this ->imageManager ->setCachedImage ('touchIcon- ' . $ app . $ color , $ icon );
168170 }
169171 $ response = new FileDisplayResponse ($ iconFile , Http::STATUS_OK , ['Content-Type ' => 'image/png ' ]);
170172 }
0 commit comments