1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 04:39:01 +00:00

Fix media image on dashboard-level background (#27934)

This commit is contained in:
karwosts
2025-11-13 05:43:27 -08:00
committed by Bram Kragten
parent be392be1e6
commit d8e8c9aa02

View File

@@ -109,6 +109,7 @@ export class HUIViewBackground extends LitElement {
protected willUpdate(changedProperties: PropertyValues<this>) {
super.willUpdate(changedProperties);
let applyTheme = false;
if (changedProperties.has("hass") && this.hass) {
const oldHass = changedProperties.get("hass");
if (
@@ -116,16 +117,18 @@ export class HUIViewBackground extends LitElement {
this.hass.themes !== oldHass.themes ||
this.hass.selectedTheme !== oldHass.selectedTheme
) {
this._applyTheme();
return;
applyTheme = true;
}
}
if (changedProperties.has("background")) {
this._applyTheme();
applyTheme = true;
this._fetchMedia();
}
if (changedProperties.has("resolvedImage")) {
applyTheme = true;
}
if (applyTheme) {
this._applyTheme();
}
}