mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 15:37:03 +03:00
More improvements for https://github.com/the-djmaze/snappymail/issues/37
This commit is contained in:
parent
b3b8c97b00
commit
cd52d9ae6c
3 changed files with 5 additions and 5 deletions
|
|
@ -95,7 +95,7 @@ class GeneralUserSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
testSystemNotification() {
|
testSystemNotification() {
|
||||||
NotificationStore.displayDesktopNotification('SnappyMail', 'Test notification', { 'Folder': '', 'Uid': '' });
|
NotificationStore.displayDesktopNotification('SnappyMail', 'Test notification', { });
|
||||||
}
|
}
|
||||||
|
|
||||||
onBuild() {
|
onBuild() {
|
||||||
|
|
|
||||||
|
|
@ -236,9 +236,7 @@ class MessageUserStore {
|
||||||
initUidNextAndNewMessages(folder, uidNext, newMessages) {
|
initUidNextAndNewMessages(folder, uidNext, newMessages) {
|
||||||
if (getFolderInboxName() === folder && uidNext) {
|
if (getFolderInboxName() === folder && uidNext) {
|
||||||
if (Array.isNotEmpty(newMessages)) {
|
if (Array.isNotEmpty(newMessages)) {
|
||||||
newMessages.forEach(item => {
|
newMessages.forEach(item => addNewMessageCache(folder, item.Uid));
|
||||||
addNewMessageCache(folder, item.Uid);
|
|
||||||
});
|
|
||||||
|
|
||||||
NotificationStore.playSoundNotification();
|
NotificationStore.playSoundNotification();
|
||||||
|
|
||||||
|
|
@ -249,7 +247,7 @@ class MessageUserStore {
|
||||||
i18n('MESSAGE_LIST/NEW_MESSAGE_NOTIFICATION', {
|
i18n('MESSAGE_LIST/NEW_MESSAGE_NOTIFICATION', {
|
||||||
'COUNT': len
|
'COUNT': len
|
||||||
}),
|
}),
|
||||||
{ 'Folder': '', 'Uid': '' }
|
{ 'Url': mailBox(newMessages[0].Folder, 1) }
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
newMessages.forEach(item => {
|
newMessages.forEach(item => {
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ const HTML5Notification = window.Notification ? Notification : null,
|
||||||
focus();
|
focus();
|
||||||
if (data.Folder && data.Uid) {
|
if (data.Folder && data.Uid) {
|
||||||
dispatchEvent(new CustomEvent('mailbox.message.show', {detail:data}));
|
dispatchEvent(new CustomEvent('mailbox.message.show', {detail:data}));
|
||||||
|
} else if (data.Url) {
|
||||||
|
rl.route.setHash(data.Url);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue