mirror of https://github.com/zulip/zulip.git
audible_notifications: Add missing $ prefix to parameter.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
340b0a1181
commit
41c64ee8bb
|
@ -6,19 +6,19 @@ export function initialize() {
|
|||
update_notification_sound_source($("#user-notification-sound-audio"), user_settings);
|
||||
}
|
||||
|
||||
export function update_notification_sound_source(container_elem, settings_object) {
|
||||
export function update_notification_sound_source($container_elem, settings_object) {
|
||||
const notification_sound = settings_object.notification_sound;
|
||||
const audio_file_without_extension = "/static/audio/notification_sounds/" + notification_sound;
|
||||
container_elem
|
||||
$container_elem
|
||||
.find(".notification-sound-source-ogg")
|
||||
.attr("src", `${audio_file_without_extension}.ogg`);
|
||||
container_elem
|
||||
$container_elem
|
||||
.find(".notification-sound-source-mp3")
|
||||
.attr("src", `${audio_file_without_extension}.mp3`);
|
||||
|
||||
if (notification_sound !== "none") {
|
||||
// Load it so that it is ready to be played; without this the old sound
|
||||
// is played.
|
||||
container_elem[0].load();
|
||||
$container_elem[0].load();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue