Add naive badge count implementation

This commit is contained in:
Matthew Remmel
2025-09-23 11:34:53 -04:00
committed by hodlbod
parent 5cb22d0bed
commit d1e5aee84e
3 changed files with 37 additions and 2 deletions
+4
View File
@@ -109,6 +109,7 @@
import * as requests from "@app/core/requests"
import * as notifications from "@app/util/notifications"
import * as appState from "@app/core/state"
import {badgeCount, handleBadgeCountChanges} from "@app/util/notifications"
// Migration: old nostrtalk instance used different sessions
if ($session && !$signer) {
@@ -465,6 +466,9 @@
},
)
// subscribe to badge count for changes
badgeCount.subscribe(handleBadgeCountChanges)
// Listen for signer errors, report to user via toast
signerLog.subscribe(
throttle(10_000, $log => {