Marino Faggiana před 6 roky
rodič
revize
2b0fcfe328

+ 3 - 12
iOSClient/Main/CCMain.m

@@ -338,9 +338,6 @@
 //
 - (void)initializeMain:(NSNotification *)notification
 {
-    NSDictionary *dict = notification.userInfo;
-    BOOL pushNotification = [[dict valueForKey:@"PushNotification"] boolValue];
-    
     _directoryGroupBy = nil;
     _directoryOrder = nil;
     _dateReadDataSource = nil;
@@ -407,11 +404,7 @@
         
         // Read this folder
         [self readFileReloadFolder];
-        
-        // unsubscribing -> subscribing
-        if (pushNotification)
-            [appDelegate unsubscribingNextcloudServerPushNotification:YES];
-        
+                
     } else {
         
         // reload datasource
@@ -1028,8 +1021,7 @@
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.2 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
         
         // go to home sweet home
-        NSDictionary* userInfo = @{@"PushNotification": [NSNumber numberWithBool:YES]};
-        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:userInfo];
+        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
         
         [_ImageTitleHomeCryptoCloud setUserInteractionEnabled:YES];
     });
@@ -2647,8 +2639,7 @@
             [appDelegate settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:tableAccount.password];
     
             // go to home sweet home
-            NSDictionary* userInfo = @{@"PushNotification": [NSNumber numberWithBool:YES]};
-            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:userInfo];        
+            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];        
         }
     });
 }

+ 2 - 4
iOSClient/Main/CCSplit.m

@@ -119,8 +119,7 @@
     self.build = [CCUtility setBuild];
     
     // init home
-    NSDictionary* userInfo = @{@"PushNotification": [NSNumber numberWithBool:NO]};
-    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:userInfo];
+    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
 }
 
 #pragma --------------------------------------------------------------------------------------------
@@ -182,8 +181,7 @@
 
 - (void)loginSuccess:(NSInteger)loginType
 {
-    NSDictionary* userInfo = @{@"PushNotification": [NSNumber numberWithBool:YES]};
-    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:userInfo];
+    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
 }
 
 - (void)loginClose

+ 1 - 2
iOSClient/Settings/CCAdvanced.m

@@ -401,8 +401,7 @@
             // Close HUD
             [self.hud hideHud];
             // Inizialized home
-            NSDictionary* userInfo = @{@"PushNotification": [NSNumber numberWithBool:NO]};
-            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:userInfo];
+            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
         });
     });
 }

+ 2 - 4
iOSClient/Settings/CCManageAccount.m

@@ -201,8 +201,7 @@
 
 - (void)loginSuccess:(NSInteger)loginType
 {
-    NSDictionary* userInfo = @{@"PushNotification": [NSNumber numberWithBool:YES]};
-    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:userInfo];
+    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
 }
 
 - (void)loginClose
@@ -346,8 +345,7 @@
             [appDelegate settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:tableAccount.password];
  
             // Init home
-            NSDictionary* userInfo = @{@"PushNotification": [NSNumber numberWithBool:YES]};
-            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:userInfo];
+            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
             
             [self UpdateForm];
         }