fix: Audio notification instance not updating in realtime

This commit is contained in:
iamsivin
2024-06-12 18:01:56 +05:30
parent 650fee58a6
commit dcbb045bcd
4 changed files with 33 additions and 26 deletions
@@ -36,6 +36,18 @@ class DashboardAudioNotificationHelper {
initFaviconSwitcher();
};
updateInstanceValues = ({
alwaysPlayAudioAlert,
alertIfUnreadConversationExist,
audioAlertType,
audioAlertTone,
}) => {
this.audioAlertType = audioAlertType;
this.playAlertOnlyWhenHidden = !alwaysPlayAudioAlert;
this.alertIfUnreadConversationExist = alertIfUnreadConversationExist;
this.audioAlertTone = audioAlertTone;
};
onAudioListenEvent = async () => {
try {
await getAlertAudio('', {