Don't notify for old mailbox messages

This commit is contained in:
yflory 2020-11-12 17:20:48 +01:00
parent cebe1252f8
commit 90b4b0459e
1 changed files with 2 additions and 2 deletions

View File

@ -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);
});
});