Browse Source

update logic

pull/185/head
Marc Hyeler 2 years ago
parent
commit
1dfc486137
  1. 4
      src/core/subscriptions.ts
  2. 1
      src/core/utils/notify.ts

4
src/core/subscriptions.ts

@ -85,7 +85,9 @@ export const subscribeAll = (
...messagePacket, ...messagePacket,
state: messagePacket.from !== myNodeNum ? "ack" : "waiting", state: messagePacket.from !== myNodeNum ? "ack" : "waiting",
}); });
playNotificationSound(); if(messagePacket.from !== myNodeNum){
playNotificationSound();
}
}); });
connection.events.onPendingSettingsChange.subscribe((state) => { connection.events.onPendingSettingsChange.subscribe((state) => {

1
src/core/utils/notify.ts

@ -10,6 +10,7 @@ export const playNotificationSound = () => {
isPlaying = true; isPlaying = true;
notificationSound.play(); notificationSound.play();
notificationSound.onended = () => { notificationSound.onended = () => {
isPlaying = false; isPlaying = false;
}; };

Loading…
Cancel
Save