Marino Faggiana 6 жил өмнө
parent
commit
d40919f8a9

+ 15 - 0
iOSClient/Database/NCManageDatabase.swift

@@ -2526,5 +2526,20 @@ class NCManageDatabase: NSObject {
         }
     }
     
+    @objc func getTrash(filePath: String) -> tableTrash? {
+        
+        guard let tableAccount = self.getAccountActive() else {
+            return nil
+        }
+        
+        let realm = try! Realm()
+        realm.refresh()
+        
+        let results = realm.objects(tableTrash.self).filter("account = %@ AND filePath = %@", tableAccount.account, filePath)
+
+        
+        return tableTrash.init(value: results)
+    }
+    
     //MARK: -
 }

+ 0 - 3
iOSClient/Trash/NCTrash.swift

@@ -12,9 +12,6 @@ class NCTrash: UICollectionViewController {
     
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
     var path = ""
-
-    //NSString *userID = [_userID stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
-    //NSString *serverPath = [NSString stringWithFormat:@"%@%@/%@trashbin/%@/trash", serverUrl, k_dav, path, userID];
     
     override func viewDidLoad() {
         super.viewDidLoad()