瀏覽代碼

dev pushNotification

Marino Faggiana 6 年之前
父節點
當前提交
903d8c6d11
共有 2 個文件被更改,包括 2 次插入10 次删除
  1. 1 1
      iOSClient/AppDelegate.h
  2. 1 9
      iOSClient/AppDelegate.m

+ 1 - 1
iOSClient/AppDelegate.h

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

+ 1 - 9
iOSClient/AppDelegate.m

@@ -428,24 +428,16 @@
     }];
 }
 
-- (void)unsubscribingNextcloudServerPushNotification:(BOOL)withSubscribing
+- (void)unsubscribingNextcloudServerPushNotification
 {
     // test
     if (self.activeAccount.length == 0 || self.maintenanceMode)
         return;
     
-    if (self.pnDeviceIdentifier == nil || self.pnDeviceIdentifierSignature == nil || self.pnPublicKey == nil) {
-        if (withSubscribing)
-            [self subscribingNextcloudServerPushNotification];
-        return;
-    }
-    
     OCnetworking *ocNetworking = [[OCnetworking alloc] initWithDelegate:nil metadataNet:nil withUser:self.activeUser withUserID:self.activeUserID withPassword:self.activePassword withUrl:self.activeUrl];
 
     [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.");
     }];