diff --git a/projects/notification-electron/src/lib/services/notification.service.ts b/projects/notification-electron/src/lib/services/notification.service.ts index 126d9c4..11c0f0b 100644 --- a/projects/notification-electron/src/lib/services/notification.service.ts +++ b/projects/notification-electron/src/lib/services/notification.service.ts @@ -201,6 +201,17 @@ export class NotificationService { }); } + closeAll(): void { + this.__animationQueue.clear(); + this.__activated.forEach(a => { + a.browserWindow.close(); + }); + this.__activated = []; + this.__delayQueue = []; + this.__closed.clear(); + this.__windowPooler.closeAll(); + } + private __show( notification: Notification ): Promise { diff --git a/projects/notification-electron/src/lib/utils/animation.queue.ts b/projects/notification-electron/src/lib/utils/animation.queue.ts index 97f30c0..552453a 100644 --- a/projects/notification-electron/src/lib/utils/animation.queue.ts +++ b/projects/notification-electron/src/lib/utils/animation.queue.ts @@ -20,6 +20,7 @@ export class AnimationQueue { clear(): void { this.__queueObjects = []; + this.__running = false; } private __animate(o: QueueObject): void {