Bläddra i källkod

clear old code

marinofaggiana 5 år sedan
förälder
incheckning
04918bb2d4

+ 1 - 0
iOSClient/AppDelegate.m

@@ -640,6 +640,7 @@ PKPushRegistry *pushRegistry;
         self.sharesUserAndGroup = result[1];
     }
     
+    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"ShareReloadDatasource" object:nil userInfo:nil];
     [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"SharesReloadDatasource" object:nil userInfo:nil];
 }
 

+ 1 - 1
iOSClient/Main/CCMain.m

@@ -1874,7 +1874,7 @@
 {
     if (_shareOC) {
         
-        [_shareOC reloadData];
+        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"ShareReloadDatasource" object:nil userInfo:nil];
         
     } else if (metadata) {
         

+ 0 - 3
iOSClient/Share/CCShareOC.h

@@ -48,9 +48,6 @@
 @property (nonatomic, weak) CCShareUserOC *shareUserOC;
 @property (nonatomic, weak) CCSharePermissionOC *sharePermissionOC;
 
-- (void)reloadData;
-- (void)reloadUserAndGroup:(NSArray *)items;
-
 - (IBAction)endButtonAction:(id)sender;
 
 @end

+ 6 - 5
iOSClient/Share/CCShareOC.m

@@ -40,9 +40,10 @@
     if (self) {
         
         appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-
         self.itemsShareWith = [[NSMutableArray alloc] init];
-        
+
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadData) name:@"ShareReloadDatasource" object:nil];
+
         [self initializeForm];
     }
     return self;
@@ -172,7 +173,7 @@
         
         if (errorCode == 0 && [account isEqualToString:appDelegate.activeAccount]) {
             
-            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"SharesReloadDatasource" object:nil userInfo:nil];
+            [self reloadData];
             
         } else if (errorCode != 0) {
             
@@ -197,7 +198,7 @@
                 appDelegate.sharesUserAndGroup = result[1];
             }
             
-            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"SharesReloadDatasource" object:nil userInfo:nil];
+            [self reloadData];
             
         } else if (errorCode != 0) {
             
@@ -214,7 +215,7 @@
         
         if (errorCode == 0 && [account isEqualToString:appDelegate.activeAccount]) {
             
-            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"SharesReloadDatasource" object:nil userInfo:nil];
+            [self reloadData];
             
         } else if (errorCode != 0) {
             

+ 1 - 1
iOSClient/Share/CCSharePermissionOC.m

@@ -170,7 +170,7 @@
         
         if (errorCode == 0 && [account isEqualToString:appDelegate.activeAccount]) {
             
-            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"SharesReloadDatasource" object:nil userInfo:nil];
+            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"ShareReloadDatasource" object:nil userInfo:nil];
             
             [self dismissViewControllerAnimated:YES completion:nil];
             

+ 1 - 1
iOSClient/Share/CCShareUserOC.m

@@ -120,7 +120,7 @@
         
         if (errorCode == 0 && [account isEqualToString:appDelegate.activeAccount]) {
             
-            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"SharesReloadDatasource" object:nil userInfo:nil];
+            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"ShareReloadDatasource" object:nil userInfo:nil];
             
             [self dismissViewControllerAnimated:YES completion:nil];
 

+ 0 - 1
iOSClient/Shares/NCShares.m

@@ -46,7 +46,6 @@
         appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
 
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
-        
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadDatasource) name:@"SharesReloadDatasource" object:nil];
     }
     return self;