marinofaggiana 4 年之前
父節點
當前提交
875322ded9
共有 1 個文件被更改,包括 11 次插入1 次删除
  1. 11 1
      iOSClient/Main/Collection/NCCollectionViewCommon.swift

+ 11 - 1
iOSClient/Main/Collection/NCCollectionViewCommon.swift

@@ -241,7 +241,17 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         }
     }
     
-    @objc func copyFile(_ notification: NSNotification) { }
+    @objc func copyFile(_ notification: NSNotification) {
+        if self.view?.window == nil { return }
+        
+        if let userInfo = notification.userInfo as NSDictionary? {
+            if let serverUrlTo = userInfo["serverUrlTo"] as? String {
+                if serverUrlTo == self.serverUrl {
+                    self.reloadDataSource()
+                }
+            }
+        }
+    }
     
     @objc func renameFile(_ notification: NSNotification) {
         if self.view?.window == nil { return }