Refactor to avoid use of "all-static" classes.

This commit is contained in:
Dermot Duffy
2022-05-12 21:06:27 -07:00
parent 6b30487229
commit 441162f052
9 changed files with 454 additions and 462 deletions
+8 -4
View File
@@ -13,7 +13,11 @@ import { customElement, property } from 'lit/decorators.js';
import galleryStyle from '../scss/gallery.scss';
import { CameraConfig, frigateCardConfigDefaults, GalleryConfig } from '../types.js';
import { stopEventFromActivatingCardWideActions } from '../utils/action.js';
import { BrowseMediaUtil } from '../utils/ha/browse-media.js';
import {
fetchChildMediaAndDispatchViewChange,
fetchLatestMediaAndDispatchViewChange,
getFullDependentBrowseMediaQueryParametersOrDispatchError
} from '../utils/ha/browse-media';
import { View } from '../view.js';
import { renderProgressIndicator } from './message.js';
import './thumbnail.js';
@@ -51,7 +55,7 @@ export class FrigateCardGallery extends LitElement {
if (!this.view.target) {
const browseMediaQueryParameters =
BrowseMediaUtil.getFullDependentBrowseMediaQueryParametersOrDispatchError(
getFullDependentBrowseMediaQueryParametersOrDispatchError(
this,
this.hass,
this.cameras,
@@ -63,7 +67,7 @@ export class FrigateCardGallery extends LitElement {
return;
}
BrowseMediaUtil.fetchLatestMediaAndDispatchViewChange(
fetchLatestMediaAndDispatchViewChange(
this,
this.hass,
this.view,
@@ -216,7 +220,7 @@ export class FrigateCardGalleryCore extends LitElement {
<ha-card
@click=${(ev) => {
if (this.hass && this.view) {
BrowseMediaUtil.fetchChildMediaAndDispatchViewChange(
fetchChildMediaAndDispatchViewChange(
this,
this.hass,
this.view,