diff --git a/app/javascript/dashboard/helper/AudioAlerts/DashboardAudioNotificationHelper.js b/app/javascript/dashboard/helper/AudioAlerts/DashboardAudioNotificationHelper.js index 724fd18cf..d591fd1cf 100644 --- a/app/javascript/dashboard/helper/AudioAlerts/DashboardAudioNotificationHelper.js +++ b/app/javascript/dashboard/helper/AudioAlerts/DashboardAudioNotificationHelper.js @@ -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('', { diff --git a/app/javascript/dashboard/helper/scriptHelpers.js b/app/javascript/dashboard/helper/scriptHelpers.js index 292751a94..696320171 100644 --- a/app/javascript/dashboard/helper/scriptHelpers.js +++ b/app/javascript/dashboard/helper/scriptHelpers.js @@ -21,7 +21,7 @@ const initializeAudioAlerts = user => { enable_audio_alerts: audioAlertType, alert_if_unread_assigned_conversation_exist: alertIfUnreadConversationExist, notification_tone: audioAlertTone, - // UI Settings can be undefined initally as we don't send the + // UI Settings can be undefined initially as we don't send the // entire payload for the user during the signup process. } = uiSettings || {}; diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/AudioNotifications.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/AudioNotifications.vue index 84f369f5a..22cc40ec6 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/profile/AudioNotifications.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/profile/AudioNotifications.vue @@ -30,6 +30,7 @@