Marino Faggiana 8 жил өмнө
parent
commit
f1bfb3462a

+ 1 - 1
iOSClient/FileSystem/CCCoreData.m

@@ -2194,7 +2194,7 @@
     
     if (account) {
         
-        [TableActivity MR_deleteAllMatchingPredicate:[NSPredicate predicateWithFormat:@"(account == %@)", account] inContext:context];
+        [TableActivity MR_deleteAllMatchingPredicate:[NSPredicate predicateWithFormat:@"(account == %@) || (account == '')", account] inContext:context];
         
     } else {
         

+ 2 - 3
iOSClient/MenuAccount+ControlCenter/CCControlCenterActivity.m

@@ -95,7 +95,7 @@
             predicate = [NSPredicate predicateWithFormat:@"(account == %@) AND (verbose == %lu) AND (date > %@)", app.activeAccount, k_activityVerboseDefault, sixDaysAgo];
 
         _sectionDataSource = [CCCoreData getAllTableActivityWithPredicate: predicate];
-
+        
         [self reloadCollection];
     }
 }
@@ -115,7 +115,7 @@
         dateActivity = ((TableActivity *)[_sectionDataSource objectAtIndex:0]).date;
     }
 
-    if ([dateActivity compare:_storeDateFirstActivity] == NSOrderedDescending || _storeDateFirstActivity == nil) {
+    if ([dateActivity compare:_storeDateFirstActivity] == NSOrderedDescending || _storeDateFirstActivity == nil || dateActivity == nil) {
         _storeDateFirstActivity = dateActivity;
         [self.collectionView reloadData];
     }
@@ -130,7 +130,6 @@
     return [_sectionDataSource count];
 }
 
-
 - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
 {
     TableActivity *activity = [_sectionDataSource objectAtIndex:section];

+ 1 - 4
iOSClient/Settings/CCManageHelp.m

@@ -253,10 +253,7 @@
     
     [CCCoreData flushTableActivityAccount:app.activeAccount];
     
-    CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:app.activeAccount];
-    
-    metadataNet.action = actionGetActivityServer;
-    [app addNetworkingOperationQueue:app.netQueue delegate:app.activeMain metadataNet:metadataNet];
+    [app.controlCenterActivity reloadDatasource];
 }
 
 @end