diff --git a/src/components/thumbnail.ts b/src/components/thumbnail.ts index b802d673..b2813089 100644 --- a/src/components/thumbnail.ts +++ b/src/components/thumbnail.ts @@ -91,6 +91,7 @@ export class FrigateCardThumbnail extends LitElement { view: 'timeline', target: this.target, childIndex: this.childIndex, + context: {}, }) .dispatchChangeEvent(this); }} diff --git a/src/components/timeline.ts b/src/components/timeline.ts index f13bfedb..db9971db 100644 --- a/src/components/timeline.ts +++ b/src/components/timeline.ts @@ -604,11 +604,13 @@ export class FrigateCardTimelineCore extends LitElement { ? (this.view.context as TimelineViewContext) : undefined; - if (context && !isEqual(context.window, timelineWindow)) { + if (context?.window) { console.info( `Setting window from context (${context.window.start} -> ${context.window.end}`, ); - this._timeline.setWindow(context.window.start, context.window.end); + if (!isEqual(context.window, timelineWindow)) { + this._timeline.setWindow(context.window.start, context.window.end); + } } else if ( eventStart < timelineWindow.start || eventStart > timelineWindow.end ||