This commit is contained in:
djmaze 2020-11-10 09:59:56 +01:00
parent b3b8c97b00
commit cd52d9ae6c
3 changed files with 5 additions and 5 deletions

View file

@ -95,7 +95,7 @@ class GeneralUserSettings {
}
testSystemNotification() {
NotificationStore.displayDesktopNotification('SnappyMail', 'Test notification', { 'Folder': '', 'Uid': '' });
NotificationStore.displayDesktopNotification('SnappyMail', 'Test notification', { });
}
onBuild() {

View file

@ -236,9 +236,7 @@ class MessageUserStore {
initUidNextAndNewMessages(folder, uidNext, newMessages) {
if (getFolderInboxName() === folder && uidNext) {
if (Array.isNotEmpty(newMessages)) {
newMessages.forEach(item => {
addNewMessageCache(folder, item.Uid);
});
newMessages.forEach(item => addNewMessageCache(folder, item.Uid));
NotificationStore.playSoundNotification();
@ -249,7 +247,7 @@ class MessageUserStore {
i18n('MESSAGE_LIST/NEW_MESSAGE_NOTIFICATION', {
'COUNT': len
}),
{ 'Folder': '', 'Uid': '' }
{ 'Url': mailBox(newMessages[0].Folder, 1) }
);
} else {
newMessages.forEach(item => {

View file

@ -14,6 +14,8 @@ const HTML5Notification = window.Notification ? Notification : null,
focus();
if (data.Folder && data.Uid) {
dispatchEvent(new CustomEvent('mailbox.message.show', {detail:data}));
} else if (data.Url) {
rl.route.setHash(data.Url);
}
};