returning banner id

This commit is contained in:
Miodec 2022-10-13 14:24:40 +02:00
parent 1481f292ac
commit ea6fbfb21e

View file

@ -254,8 +254,8 @@ export function addBanner(
sticky = false,
closeCallback?: () => void,
allowHTML?: boolean
): void {
new Notification(
): number {
const banner = new Notification(
"banner",
message,
level,
@ -264,7 +264,9 @@ export function addBanner(
customIcon,
closeCallback,
allowHTML
).show();
);
banner.show();
return banner.id;
}
const debouncedMarginUpdate = debounce(100, updateMargin);