From 399a4e2c515f723b1c8fe5f20840fc0e36fa7c9b Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Fri, 3 Oct 2025 17:03:25 -0700 Subject: fix: remove subscriptions after disabling notifications --- site/src/components/NotificationButton.tsx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'site/src/components') 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) { -- cgit v1.2.3