forked from coracle/flotilla
Fix memory leak, notification badge not showing
This commit is contained in:
@@ -23,16 +23,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
$effect(() => {
|
||||
if ($notifications.size > notificationCount) {
|
||||
playSound()
|
||||
}
|
||||
|
||||
notificationCount = $notifications.size
|
||||
})
|
||||
|
||||
onMount(() => {
|
||||
audioElement.load()
|
||||
|
||||
notifications.subscribe(notifications => {
|
||||
if (notifications.size > notificationCount) {
|
||||
playSound()
|
||||
}
|
||||
|
||||
notificationCount = notifications.size
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user