marinofaggiana 5 年之前
父节点
当前提交
1e1f32e502
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 4 4
      iOSClient/Main/CCMain.m
  2. 1 1
      iOSClient/Main/NCDetailViewController.swift

+ 4 - 4
iOSClient/Main/CCMain.m

@@ -1528,7 +1528,7 @@
                             tableMetadata *metadataNew = [[NCManageDatabase sharedInstance] renameMetadataWithFileNameTo:fileNameNew ocId:metadata.ocId];
                             
                             if (metadataNew) {
-                                NSDictionary* userInfo = @{@"metadata": metadataNew, @"errorCode": @(errorCode)};
+                                NSDictionary* userInfo = @{@"metadata": metadata, @"metadataNew": metadataNew, @"errorCode": @(errorCode)};
                                 [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_renameFile object:nil userInfo:userInfo];
                             }
                             
@@ -1568,7 +1568,7 @@
                             
                             [[NCContentPresenter shared] messageNotification:@"_rename_" description:message delay:k_dismissAfterSecond type:messageTypeError errorCode:errorCode];
                             
-                            NSDictionary* userInfo = @{@"metadata": metadata, @"errorCode": @(errorCode)};
+                            NSDictionary* userInfo = @{@"metadata": metadata, @"metadataNew": metadata, @"errorCode": @(errorCode)};
                             [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_renameFile object:nil userInfo:userInfo];
                             
                         } else {
@@ -1637,7 +1637,7 @@
                         [[NCManageDatabase sharedInstance] clearDateReadWithServerUrl:serverUrlTo account:account];
                         
                         if (metadataNew) {
-                            NSDictionary* userInfo = @{@"metadata": metadataNew, @"errorCode": @(errorCode)};
+                            NSDictionary* userInfo = @{@"metadata": metadata, @"metadataNew": metadataNew, @"errorCode": @(errorCode)};
                             [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_moveFile object:nil userInfo:userInfo];
                         }
                         
@@ -1675,7 +1675,7 @@
                         else
                             [[NCMainCommon sharedInstance] reloadDatasourceWithServerUrl:metadata.serverUrl ocId:nil action:k_action_NULL];
                         
-                        NSDictionary* userInfo = @{@"metadata": metadata, @"errorCode": @(errorCode)};
+                        NSDictionary* userInfo = @{@"metadata": metadata, @"metadataNew": metadata, @"errorCode": @(errorCode)};
                         [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_moveFile object:nil userInfo:userInfo];
                         
                     } else {

+ 1 - 1
iOSClient/Main/NCDetailViewController.swift

@@ -136,7 +136,7 @@ class NCDetailViewController: UIViewController {
     
     @objc func moveFile(_ notification: NSNotification) {
         if let userInfo = notification.userInfo as NSDictionary? {
-            if let metadata = userInfo["metadata"] as? tableMetadata, let errorCode = userInfo["errorCode"] as? String {
+            if let metadata = userInfo["metadata"] as? tableMetadata, let metadataNew = userInfo["metadataNew"] as? tableMetadata, let errorCode = userInfo["errorCode"] as? String {
                 if errorCode != "0" { return }
             }
         }