From 59f427f1b530fbafe8fc2b43d2e3ca9c7b75fc78 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 12 Nov 2020 17:20:48 +0100 Subject: [PATCH] Don't notify for old mailbox messages --- www/common/outer/mailbox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/outer/mailbox.js b/www/common/outer/mailbox.js index 11c912a44..803d8bc93 100644 --- a/www/common/outer/mailbox.js +++ b/www/common/outer/mailbox.js @@ -297,6 +297,7 @@ proxy.mailboxes = { msg: msg, hash: hash }; + var notify = box.ready; Handlers.add(ctx, box, message, function (dismissed, toDismiss) { if (toDismiss) { // List of other messages to remove dismiss(ctx, toDismiss, '', function () { @@ -314,8 +315,7 @@ proxy.mailboxes = { } box.content[hash] = msg; showMessage(ctx, type, message, null, function (obj) { - if (!box.ready) { return; } - if (!obj || !obj.msg) { return; } + if (!obj || !obj.msg || !notify) { return; } Notify.system(undefined, obj.msg); }); });