Skip to content

Commit

Permalink
fix: default action should fetch new media (#1767)
Browse files Browse the repository at this point in the history
  • Loading branch information
dermotduffy authored Dec 16, 2024
1 parent 092c050 commit e2b6d38
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/card-controller/actions/actions/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { FrigateCardAction } from './base';

export class DefaultAction extends FrigateCardAction<GeneralActionConfig> {
public async execute(api: CardActionsAPI): Promise<void> {
api.getViewManager().setViewDefault();
await api.getViewManager().setViewDefaultWithNewQuery();
}
}
2 changes: 1 addition & 1 deletion src/card-controller/actions/actions/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FrigateCardAction } from './base';

export class ViewAction extends FrigateCardAction<ViewActionConfig> {
public async execute(api: CardActionsAPI): Promise<void> {
api.getViewManager().setViewByParametersWithNewQuery({
await api.getViewManager().setViewByParametersWithNewQuery({
params: {
view: this._action.frigate_card_action,
},
Expand Down
2 changes: 1 addition & 1 deletion tests/card-controller/actions/actions/default.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ it('should handle default action', async () => {

await action.execute(api);

expect(api.getViewManager().setViewDefault).toBeCalled();
expect(api.getViewManager().setViewDefaultWithNewQuery).toBeCalled();
});

0 comments on commit e2b6d38

Please sign in to comment.