diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-10-03 17:03:25 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-10-03 17:03:53 -0700 |
| commit | 399a4e2c515f723b1c8fe5f20840fc0e36fa7c9b (patch) | |
| tree | 99d63ecbe8f514b35594c84d6d82b58197f83f38 /site/src/components | |
| parent | 8aa09338d305d7aa3539f983a28cae0ed614d0b8 (diff) | |
fix: remove subscriptions after disabling notifications
Diffstat (limited to 'site/src/components')
| -rw-r--r-- | site/src/components/NotificationButton.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/site/src/components/NotificationButton.tsx b/site/src/components/NotificationButton.tsx index 1e9bc5e..fa31cde 100644 --- a/site/src/components/NotificationButton.tsx +++ b/site/src/components/NotificationButton.tsx @@ -178,6 +178,9 @@ export default function NotificationButton({ className = "", isMoe = false, game console.log("FCM token deleted"); localStorage.removeItem('fcm_token'); + // Clear all subscribed topics + localStorage.removeItem('subscribed_topics'); + if ('serviceWorker' in navigator) { const registration = await navigator.serviceWorker.getRegistration('/firebase-messaging-sw.js'); if (registration) { |
