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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user