marinofaggiana 5 年之前
父节点
当前提交
722b3ba23c

+ 1 - 2
iOSClient/Main/Menu/NCDetailNavigationController+Menu.swift

@@ -58,8 +58,7 @@ extension NCDetailNavigationController {
                     
                     alertController.addAction(UIAlertAction(title: NSLocalizedString("_yes_delete_", comment: ""), style: .default) { (action:UIAlertAction) in
                         
-                        NCMainCommon.sharedInstance.deleteFile(metadatas: [metadata], e2ee: false, serverUrl: "", folderocId: "") { (errorCode, errorMessage) in
-                            
+                        NCNetworking.sharedInstance.deleteMetadata(metadata, notificationCenterPost: true) { (errorCode, errorMessage) in
                             if errorCode == 0 {
                                 NCMainCommon.sharedInstance.reloadDatasource(ServerUrl: metadata.serverUrl, ocId: metadata.ocId, action: k_action_DEL)
                             }

+ 1 - 1
iOSClient/Networking/NCNetworking.swift

@@ -247,7 +247,7 @@ import NCCommunication
     
     //MARK: - WebDav
     
-    @objc func deleteMetadata(_ metadata: tableMetadata, with notificationCenterPost:Bool, completion: @escaping (_ errorCode: Int, _ message: String)->()) {
+    @objc func deleteMetadata(_ metadata: tableMetadata, notificationCenterPost:Bool, completion: @escaping (_ errorCode: Int, _ message: String)->()) {
         
         // verify permission
         let permission = NCUtility.sharedInstance.permissionsContainsString(metadata.permissions, permissions: k_permission_can_delete)