Remove optimization that caused scrubbing misbehavior
This commit is contained in:
@@ -678,13 +678,6 @@ export class FrigateCardTimelineCore extends LitElement {
|
||||
query: mediaQuery,
|
||||
},
|
||||
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: {
|
||||
id:
|
||||
this.viewManagerEpoch?.manager
|
||||
|
||||
+4
-2
@@ -105,13 +105,15 @@ export function contentsChanged(
|
||||
* @param func The Console func to call.
|
||||
*/
|
||||
export function errorToConsole(
|
||||
e: Error | { message: unknown },
|
||||
e: Error | { message: unknown } | string,
|
||||
func: CallableFunction = console.warn,
|
||||
): void {
|
||||
if (e instanceof FrigateCardError && e.context) {
|
||||
func(e, e.context);
|
||||
} else {
|
||||
} else if (typeof e === 'object' && 'message' in e) {
|
||||
func(e.message);
|
||||
} else {
|
||||
func(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,10 @@ describe('errorToConsole', () => {
|
||||
errorToConsole(error, func);
|
||||
expect(func).toHaveBeenCalledWith('ERROR');
|
||||
});
|
||||
it('should log string', () => {
|
||||
errorToConsole('string message');
|
||||
expect(spy).toHaveBeenCalledWith('string message');
|
||||
});
|
||||
});
|
||||
|
||||
describe('isHoverableDevice', () => {
|
||||
|
||||
Reference in New Issue
Block a user