|
@@ -211,10 +211,7 @@ export const PushNotificationProvider = ({ children }: { children: React.ReactNo
|
|
|
|
|
|
const unsubscribeFromNotifications = async () => {
|
|
const unsubscribeFromNotifications = async () => {
|
|
const settings = {
|
|
const settings = {
|
|
- 'app-ios': 0,
|
|
|
|
- 'app-android': 0,
|
|
|
|
- 'app-friends': 0,
|
|
|
|
- 'email-friends': 0
|
|
|
|
|
|
+ [Platform.OS === 'ios' ? 'app-ios' : 'app-android']: 0
|
|
};
|
|
};
|
|
|
|
|
|
await setNotificationsSettings({
|
|
await setNotificationsSettings({
|
|
@@ -236,7 +233,9 @@ export const PushNotificationProvider = ({ children }: { children: React.ReactNo
|
|
};
|
|
};
|
|
|
|
|
|
return (
|
|
return (
|
|
- <PushNotificationContext.Provider value={{ isSubscribed, toggleSubscription, unsubscribeFromNotifications }}>
|
|
|
|
|
|
+ <PushNotificationContext.Provider
|
|
|
|
+ value={{ isSubscribed, toggleSubscription, unsubscribeFromNotifications }}
|
|
|
|
+ >
|
|
{children}
|
|
{children}
|
|
</PushNotificationContext.Provider>
|
|
</PushNotificationContext.Provider>
|
|
);
|
|
);
|