Marino Faggiana 6 жил өмнө
parent
commit
7a967247d7

+ 1 - 1
iOSClient/AppDelegate.h

@@ -161,7 +161,7 @@
 
 // Push Notification
 - (void)subscribingNextcloudServerPushNotification;
-- (void)unsubscribingNextcloudServerPushNotification;
+- (void)unsubscribingNextcloudServerPushNotification:(BOOL)withSubscribing;
 
 // Theming Color
 - (void)settingThemingColorBrand;

+ 3 - 1
iOSClient/AppDelegate.m

@@ -428,7 +428,7 @@
     }];
 }
 
-- (void)unsubscribingNextcloudServerPushNotification
+- (void)unsubscribingNextcloudServerPushNotification:(BOOL)withSubscribing
 {
     if (self.pnDeviceIdentifier == nil || self.pnDeviceIdentifierSignature == nil || self.pnPublicKey == nil)
         return;
@@ -437,6 +437,8 @@
 
     [ocNetworking unsubscribingPushNotificationServer:self.activeUrl deviceIdentifier:self.pnDeviceIdentifier deviceIdentifierSignature:self.pnDeviceIdentifierSignature publicKey:self.pnPublicKey success:^{
         NSLog(@"[LOG] Unsubscribed to Push Notification server & proxy successfully.");
+        if (withSubscribing)
+            [self subscribingNextcloudServerPushNotification];
     } failure:^(NSString *message, NSInteger errorCode) {
         NSLog(@"[LOG] Unsubscribed to Push Notification server & proxy successfully.");
     }];