From 3dade4e759bc4d01af126e1f3a5d64c4057b1d20 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 27 May 2020 11:48:48 +0100 Subject: [PATCH] tweak Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/stores/ToastStore.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/stores/ToastStore.ts b/src/stores/ToastStore.ts index a26c5e0794..2f5a1f74b0 100644 --- a/src/stores/ToastStore.ts +++ b/src/stores/ToastStore.ts @@ -70,13 +70,15 @@ export default class ToastStore extends EventEmitter { dismissToast(key) { console.log("DEBUG dismissToast", key); + if (this.toasts[0] && this.toasts[0].key === key) { + this.countSeen++; + } + const length = this.toasts.length; this.toasts = this.toasts.filter(t => t.key !== key); if (length !== this.toasts.length) { if (this.toasts.length === 0) { this.countSeen = 0; - } else { - this.countSeen++; } this.emit('update');