mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-23 18:29:19 -05:00
fix(webpush): store push notification status in localStorage
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
This commit is contained in:
@@ -163,12 +163,15 @@ const UserWebPushSettings = () => {
|
||||
const verifyWebPush = async () => {
|
||||
const enabled = await verifyPushSubscription(user?.id, currentSettings);
|
||||
setWebPushEnabled(enabled);
|
||||
if (enabled) {
|
||||
localStorage.setItem('pushNotificationsEnabled', 'true');
|
||||
}
|
||||
};
|
||||
|
||||
if (user?.id) {
|
||||
verifyWebPush();
|
||||
}
|
||||
}, [user?.id, currentSettings]);
|
||||
}, [user?.id, currentSettings, dataDevices]);
|
||||
|
||||
useEffect(() => {
|
||||
const getSubscriptionEndpoint = async () => {
|
||||
|
||||
Reference in New Issue
Block a user