Don't add quickbar to history (#11429)

This commit is contained in:
Bram Kragten 2022-01-25 20:46:17 +01:00 committed by GitHub
parent ffaff30b46
commit 5be22d46ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -26,6 +26,7 @@ interface ShowDialogParams<T> {
dialogTag: keyof HTMLElementTagNameMap;
dialogImport: () => Promise<unknown>;
dialogParams: T;
addHistory?: boolean;
}
export interface DialogClosedParams {
@ -124,8 +125,15 @@ export const makeDialogManager = (
element.addEventListener(
"show-dialog",
(e: HASSDomEvent<ShowDialogParams<unknown>>) => {
const { dialogTag, dialogImport, dialogParams } = e.detail;
showDialog(element, root, dialogTag, dialogParams, dialogImport);
const { dialogTag, dialogImport, dialogParams, addHistory } = e.detail;
showDialog(
element,
root,
dialogTag,
dialogParams,
dialogImport,
addHistory
);
}
);
};

View File

@ -16,5 +16,6 @@ export const showQuickBar = (
dialogTag: "ha-quick-bar",
dialogImport: loadQuickBar,
dialogParams,
addHistory: false,
});
};