fix: default action should fetch new media (#1767)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -14,5 +14,5 @@ it('should handle default action', async () => {
|
||||
|
||||
await action.execute(api);
|
||||
|
||||
expect(api.getViewManager().setViewDefault).toBeCalled();
|
||||
expect(api.getViewManager().setViewDefaultWithNewQuery).toBeCalled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user