mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +00:00
notifications: Add support for None option in Notification sound.
This commit adds support for a `None` option in the dropdown menu of `Notification sound`. When this option is selected, no audible notification is sent to the user. `None` will appear as the first option in the dropdown menu, since this is not categorized as a playable audio. This new option is added so that folks can disable audio notifications without losing their other notification configuration (like for PMs, mentions). Necessary test case is added for this new option. Fixes #16090.
This commit is contained in:
@@ -92,7 +92,9 @@ export function set_up() {
|
||||
});
|
||||
|
||||
$("#play_notification_sound").on("click", () => {
|
||||
$("#notification-sound-audio")[0].play();
|
||||
if (page_params.notification_sound !== "none") {
|
||||
$("#notification-sound-audio")[0].play();
|
||||
}
|
||||
});
|
||||
|
||||
const notification_sound_dropdown = $("#notification_sound");
|
||||
|
||||
Reference in New Issue
Block a user