marinofaggiana 5 éve
szülő
commit
622a44c14c
2 módosított fájl, 4 hozzáadás és 12 törlés
  1. 1 1
      iOSClient/AppDelegate.m
  2. 3 11
      iOSClient/Main/CCMain.m

+ 1 - 1
iOSClient/AppDelegate.m

@@ -1579,8 +1579,8 @@ PKPushRegistry *pushRegistry;
                             // Push
                             NSString *directoryName = [[path stringByDeletingLastPathComponent] lastPathComponent];
                             NSString *serverUrl = [CCUtility deletingLastPathComponentFromServerUrl:[NSString stringWithFormat:@"%@%@/%@", matchedAccount.url, k_webDAV, [path stringByDeletingLastPathComponent]]];
-                            
                             tableMetadata *metadata = [CCUtility createMetadataWithAccount:matchedAccount.account date:[NSDate date] directory:NO fileID:[[NSUUID UUID] UUIDString] serverUrl:serverUrl fileName:directoryName etag:@"" size:0 status:k_metadataStatusNormal url:@""];
+
                             [self.activeMain performSegueDirectoryWithControlPasscode:true metadata:metadata scrollToFileNamePath:fileNamePath];
                             
                         } else {

+ 3 - 11
iOSClient/Main/CCMain.m

@@ -3756,7 +3756,7 @@
     [self.tableView reloadEmptyDataSet];
     
     // scrollToFileNamePath
-    if (self.scrollToFileNamePath != nil && withScrollToFileName ) {
+    if (self.scrollToFileNamePath != nil && withScrollToFileName) {
         for (NSString *key in sectionDataSource.allRecordsDataSource) {
             tableMetadata *metadata = [sectionDataSource.allRecordsDataSource objectForKey:key];
             NSString *metadataFileNamePath = [NSString stringWithFormat:@"%@/%@", metadata.serverUrl, metadata.fileName];
@@ -3764,13 +3764,8 @@
                 for (NSString *key in sectionDataSource.fileIDIndexPath) {
                     if ([key isEqualToString:metadata.fileID]) {
                         NSIndexPath *indexPath = [sectionDataSource.fileIDIndexPath objectForKey:key];
-                        CCCellMain *cell = [self.tableView cellForRowAtIndexPath:indexPath];
-                        if (cell) {
-                            cell.backgroundColor = [NCBrandColor sharedInstance].brandElement;
-                            [UIView animateWithDuration:3.0 animations:^{
-                                cell.backgroundColor = [UIColor whiteColor];
-                            }];
-                        }
+                        [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:NO];
+                        [self.tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
                     }
                 }
             }
@@ -4258,9 +4253,6 @@
 {
     NSString *nomeDir;
     
-    self.metadata = metadata;
-    self.scrollToFileNamePath = scrollToFileNamePath;
-    
     if (self.tableView.editing == NO) {
         
         NSString *lockServerUrl = [CCUtility stringAppendServerUrl:metadata.serverUrl addFileName:metadata.fileName];