瀏覽代碼

Update NCCollectionViewCommon.swift

Marino Faggiana 1 年之前
父節點
當前提交
9965988ce3
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

+ 7 - 2
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -516,6 +516,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
     @objc func uploadedFile(_ notification: NSNotification) {
     @objc func uploadedFile(_ notification: NSNotification) {
 
 
         guard let userInfo = notification.userInfo as NSDictionary?,
         guard let userInfo = notification.userInfo as NSDictionary?,
+              let ocId = userInfo["ocId"] as? String,
               let ocIdTemp = userInfo["ocIdTemp"] as? String,
               let ocIdTemp = userInfo["ocIdTemp"] as? String,
               let serverUrl = userInfo["serverUrl"] as? String,
               let serverUrl = userInfo["serverUrl"] as? String,
               let account = userInfo["account"] as? String
               let account = userInfo["account"] as? String
@@ -526,8 +527,12 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
             self.collectionView?.reloadData()
             self.collectionView?.reloadData()
         }
         }
 
 
-        if account == appDelegate.account, serverUrl == self.serverUrl {
-            reloadDataSource()
+        if account == appDelegate.account, serverUrl == self.serverUrl, let metadata = NCManageDatabase.shared.getMetadataFromOcId(ocId) {
+            if metadata.e2eEncrypted || metadata.chunk {
+                reloadDataSourceNetwork(isForced: true)
+            } else {
+                reloadDataSource()
+            }
         }
         }
     }
     }