From 8f1b81beccc6f838a6b131e3ac40ceaa150b9060 Mon Sep 17 00:00:00 2001 From: 0xsysr3ll <0xsysr3ll@pm.me> Date: Sun, 7 Dec 2025 16:00:16 +0100 Subject: [PATCH] fix(webpush): update localStorage handling for push notification status Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me> --- .../UserNotificationsWebPush/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx index 9338ddb2..dca0fab0 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx @@ -163,9 +163,10 @@ const UserWebPushSettings = () => { const verifyWebPush = async () => { const enabled = await verifyPushSubscription(user?.id, currentSettings); setWebPushEnabled(enabled); - if (enabled) { - localStorage.setItem('pushNotificationsEnabled', 'true'); - } + localStorage.setItem( + 'pushNotificationsEnabled', + enabled ? 'true' : 'false' + ); }; if (user?.id) {