marinofaggiana 5 лет назад
Родитель
Сommit
eaf5d999eb
3 измененных файлов с 11 добавлено и 13 удалено
  1. 6 8
      iOSClient/AppDelegate.m
  2. 4 4
      iOSClient/Main/CCMain.m
  3. 1 1
      iOSClient/Main/Cell/CCCellMain.m

+ 6 - 8
iOSClient/AppDelegate.m

@@ -1607,9 +1607,10 @@ PKPushRegistry *pushRegistry;
                                 [tbc setSelectedIndex: k_tabBarApplicationIndexFile];
                             }
                             
-                            [CATransaction begin];
-                            [CATransaction setCompletionBlock:^{
-                                
+                            [self.activeMain.navigationController popToRootViewControllerAnimated:NO];
+                            
+                            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
+                            
                                 NSString *fileNamePath = [NSString stringWithFormat:@"%@%@/%@", matchedAccount.url, k_webDAV, path];
 
                                 if ([path containsString:@"/"]) {
@@ -1629,11 +1630,8 @@ PKPushRegistry *pushRegistry;
                                     self.activeMain.scrollToFileNamePath = fileNamePath;
                                     [self.activeMain readFolder:serverUrl];
                                 }
-                            }];
-                            
-                            [self.activeMain.navigationController popToRootViewControllerAnimated:NO];
-                            [CATransaction commit];
-                            
+                            });
+                        
                         } else {
                             
                             NSString *domain = [[NSURL URLWithString:link] host];

+ 4 - 4
iOSClient/Main/CCMain.m

@@ -3111,7 +3111,6 @@
 {
     CGPoint touch = [gestureRecognizer locationInView:self.tableView];
     NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:touch];
-    CCCellMain *cell = [self.tableView cellForRowAtIndexPath:indexPath];
     
     self.metadata = [[NCMainCommon sharedInstance] getMetadataFromSectionDataSourceIndexPath:indexPath sectionDataSource:sectionDataSource];
     
@@ -3725,13 +3724,14 @@
                 for (NSString *key in sectionDataSource.fileIDIndexPath) {
                     if ([key isEqualToString:metadata.fileID]) {
                         NSIndexPath *indexPath = [sectionDataSource.fileIDIndexPath objectForKey:key];
-                        [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
-                        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
+                        [UIView animateWithDuration:0.5 animations:^{
+                            [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
+                        } completion:^(BOOL finished) {
                             CCCellMain *cell = [self.tableView cellForRowAtIndexPath:indexPath];
                             if (cell) {
                                 [cell blink];
                             }
-                        });
+                        }];
                     }
                 }
                 self.scrollToFileNamePath = nil;

+ 1 - 1
iOSClient/Main/Cell/CCCellMain.m

@@ -46,7 +46,7 @@
 
 - (void)blink
 {
-    self.viewBlink.backgroundColor = [[NCBrandColor sharedInstance] brand];
+    self.viewBlink.backgroundColor = [[[NCBrandColor sharedInstance] brand] colorWithAlphaComponent:.3];
     [UIView animateWithDuration:2 animations:^{
         self.viewBlink.backgroundColor = [UIColor whiteColor];
     }];