Fix error "Uncaught (in promise) TypeError: framework.notifyAppTab is not a function", happens in mobile view

This commit is contained in:
Hadi Nategh 2020-12-17 16:01:43 +01:00
parent 545452310c
commit 870cb9f175

View File

@ -453,7 +453,7 @@ app.classes.mail = AppJS.extend(
if (pushData.acl.folder.match(/^(INBOX.)?(Trash|Spam|Junk|Drafts|Sent)$/)) return; if (pushData.acl.folder.match(/^(INBOX.)?(Trash|Spam|Junk|Drafts|Sent)$/)) return;
// increment notification counter on (closed) mail tab // increment notification counter on (closed) mail tab
let framework = egw_getFramework(); let framework = egw_getFramework();
if (framework) framework.notifyAppTab('mail'); if (framework && framework.notifyAppTab) framework.notifyAppTab('mail');
// check if user wants a new mail notification // check if user wants a new mail notification
this.notifyNew(pushData); this.notifyNew(pushData);
} }