refac: notification sound behaviour

This commit is contained in:
Timothy Jaeryang Baek 2025-01-02 21:39:40 -08:00
parent 6b3be4bb5b
commit 996ade9090

View File

@ -12,6 +12,10 @@
export let content: string;
onMount(() => {
if (!navigator.userActivation.hasBeenActive) {
return;
}
if ($settings?.notificationSound ?? true) {
const audio = new Audio(`/audio/notification.mp3`);
audio.play();