Fix thumbnails for recordings.

This commit is contained in:
Dermot Duffy
2022-09-22 17:44:43 -07:00
parent eb88c6e0e0
commit f11822fc87
4 changed files with 63 additions and 40 deletions
+6 -5
View File
@@ -175,19 +175,20 @@ export class FrigateCardSurround extends LitElement {
) => {
const child: FrigateBrowseMediaSource | null =
ev.detail.target?.children?.[ev.detail.childIndex] ?? null;
// Send the view change from the source of the tap event, so the
// view change will be caught by the handler above (to close the drawer).
if (child) {
this.view
?.evolve({
view: this.view.is('recording') ? 'recording' : 'media',
target: ev.detail.target,
childIndex: ev.detail.childIndex,
context: null,
...(child?.frigate?.cameraID && {
camera: child?.frigate?.cameraID,
...(child.frigate?.cameraID && {
camera: child.frigate?.cameraID,
}),
})
.removeContext('timeline')
// Send the view change from the source of the tap event, so
// the view change will be caught by the handler above (to
// close the drawer).
.dispatchChangeEvent(ev.composedPath()[0]);
}
}}