mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 06:57:03 +03:00
Put sound notifications in SMAudio
This commit is contained in:
parent
78a3b1a5be
commit
df80ff9533
5 changed files with 40 additions and 40 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { koComputable } from 'External/ko';
|
||||
|
||||
import { SMAudio } from 'Common/Audio';
|
||||
import { Notification } from 'Common/Enums';
|
||||
import { MessageSetAction } from 'Common/EnumsUser';
|
||||
import { $htmlCL } from 'Common/Globals';
|
||||
|
|
@ -114,11 +115,11 @@ MessagelistUserStore.hasCheckedOrSelected = koComputable(() =>
|
|||
MessagelistUserStore.notifyNewMessages = (folder, newMessages) => {
|
||||
if (getFolderInboxName() === folder && arrayLength(newMessages)) {
|
||||
|
||||
NotificationUserStore.playSoundNotification();
|
||||
SMAudio.playNotification();
|
||||
|
||||
const len = newMessages.length;
|
||||
if (3 < len) {
|
||||
NotificationUserStore.displayDesktopNotification(
|
||||
NotificationUserStore.display(
|
||||
AccountUserStore.email(),
|
||||
i18n('MESSAGE_LIST/NEW_MESSAGE_NOTIFICATION', {
|
||||
COUNT: len
|
||||
|
|
@ -127,7 +128,7 @@ MessagelistUserStore.notifyNewMessages = (folder, newMessages) => {
|
|||
);
|
||||
} else {
|
||||
newMessages.forEach(item => {
|
||||
NotificationUserStore.displayDesktopNotification(
|
||||
NotificationUserStore.display(
|
||||
EmailCollectionModel.reviveFromJson(item.From).toString(),
|
||||
item.subject,
|
||||
{ Folder: item.Folder, Uid: item.Uid }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue