Remove optimization that caused scrubbing misbehavior
This commit is contained in:
@@ -678,13 +678,6 @@ export class FrigateCardTimelineCore extends LitElement {
|
|||||||
query: mediaQuery,
|
query: mediaQuery,
|
||||||
},
|
},
|
||||||
queryExecutorOptions: {
|
queryExecutorOptions: {
|
||||||
// Reject the new results unless there is something to be gained (i.e. they
|
|
||||||
// are not a subset of the existing results). Example usecase: On initial
|
|
||||||
// view load in mini timeline mode, the first 50 events are fetched -- the
|
|
||||||
// first drag of the timeline should not dispatch new results unless
|
|
||||||
// something is actually useful (as otherwise it creates a visible 'flicker'
|
|
||||||
// for the user as the viewer reloads all the media).
|
|
||||||
rejectResults: (results) => !!view.queryResults?.isSupersetOf(results),
|
|
||||||
selectResult: {
|
selectResult: {
|
||||||
id:
|
id:
|
||||||
this.viewManagerEpoch?.manager
|
this.viewManagerEpoch?.manager
|
||||||
|
|||||||
+4
-2
@@ -105,13 +105,15 @@ export function contentsChanged(
|
|||||||
* @param func The Console func to call.
|
* @param func The Console func to call.
|
||||||
*/
|
*/
|
||||||
export function errorToConsole(
|
export function errorToConsole(
|
||||||
e: Error | { message: unknown },
|
e: Error | { message: unknown } | string,
|
||||||
func: CallableFunction = console.warn,
|
func: CallableFunction = console.warn,
|
||||||
): void {
|
): void {
|
||||||
if (e instanceof FrigateCardError && e.context) {
|
if (e instanceof FrigateCardError && e.context) {
|
||||||
func(e, e.context);
|
func(e, e.context);
|
||||||
} else {
|
} else if (typeof e === 'object' && 'message' in e) {
|
||||||
func(e.message);
|
func(e.message);
|
||||||
|
} else {
|
||||||
|
func(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,10 @@ describe('errorToConsole', () => {
|
|||||||
errorToConsole(error, func);
|
errorToConsole(error, func);
|
||||||
expect(func).toHaveBeenCalledWith('ERROR');
|
expect(func).toHaveBeenCalledWith('ERROR');
|
||||||
});
|
});
|
||||||
|
it('should log string', () => {
|
||||||
|
errorToConsole('string message');
|
||||||
|
expect(spy).toHaveBeenCalledWith('string message');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('isHoverableDevice', () => {
|
describe('isHoverableDevice', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user