diff --git a/src/app/components/Alerts.svelte b/src/app/components/Alerts.svelte
index 279a6eb5..3693e256 100644
--- a/src/app/components/Alerts.svelte
+++ b/src/app/components/Alerts.svelte
@@ -77,7 +77,7 @@
$showUnreadBadge = !$showUnreadBadge
if (!$showUnreadBadge) {
- clearBadges()
+ await clearBadges()
}
}
diff --git a/src/app/components/NewNotificationSound.svelte b/src/app/components/NewNotificationSound.svelte
new file mode 100644
index 00000000..ee9889dd
--- /dev/null
+++ b/src/app/components/NewNotificationSound.svelte
@@ -0,0 +1,29 @@
+
+
+
diff --git a/src/app/util/notifications.ts b/src/app/util/notifications.ts
index 7910f012..d65f5b71 100644
--- a/src/app/util/notifications.ts
+++ b/src/app/util/notifications.ts
@@ -156,6 +156,8 @@ export const notifications = derived(
}
}
+ paths.add("pls")
+
return paths
},
)
@@ -165,14 +167,14 @@ export const badgeCount = derived(notifications, notifications => {
return notifications.size
})
-export const handleBadgeCountChanges = (count: number) => {
+export const handleBadgeCountChanges = async (count: number) => {
if (get(showUnreadBadge)) {
- Badge.set({count})
+ await Badge.set({count})
} else {
- clearBadges()
+ await clearBadges()
}
}
-export const clearBadges = () => {
- Badge.clear()
+export const clearBadges = async () => {
+ await Badge.clear()
}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 2c0baa0e..2e5ed7a5 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -110,6 +110,7 @@
import * as notifications from "@app/util/notifications"
import * as appState from "@app/core/state"
import {badgeCount, handleBadgeCountChanges} from "@app/util/notifications"
+ import NewNotificationSound from "@src/app/components/NewNotificationSound.svelte"
// Migration: old nostrtalk instance used different sessions
if ($session && !$signer) {
@@ -508,5 +509,6 @@