marinofaggiana 3 年之前
父節點
當前提交
26a05c2c7f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      iOSClient/Networking/NCOperationQueue.swift

+ 3 - 1
iOSClient/Networking/NCOperationQueue.swift

@@ -413,7 +413,7 @@ class NCOperationDownloadThumbnail: ConcurrentOperation {
         } else {
         } else {
             NCCommunication.shared.downloadPreview(fileNamePathOrFileId: fileNamePath, fileNamePreviewLocalPath: fileNamePreviewLocalPath , widthPreview: NCGlobal.shared.sizePreview, heightPreview: NCGlobal.shared.sizePreview, fileNameIconLocalPath: fileNameIconLocalPath, sizeIcon: NCGlobal.shared.sizeIcon) { (account, imagePreview, imageIcon,  errorCode, errorDescription) in
             NCCommunication.shared.downloadPreview(fileNamePathOrFileId: fileNamePath, fileNamePreviewLocalPath: fileNamePreviewLocalPath , widthPreview: NCGlobal.shared.sizePreview, heightPreview: NCGlobal.shared.sizePreview, fileNameIconLocalPath: fileNameIconLocalPath, sizeIcon: NCGlobal.shared.sizeIcon) { (account, imagePreview, imageIcon,  errorCode, errorDescription) in
                 
                 
-                if errorCode == 0 && imageIcon != nil {
+                if errorCode == 0 && imageIcon != nil && self.metadata.ocId == self.cell.fileObjectId {
                     
                     
                     if let filePreviewImageView = self.cell?.filePreviewImageView  {
                     if let filePreviewImageView = self.cell?.filePreviewImageView  {
                         UIView.transition(with: filePreviewImageView,
                         UIView.transition(with: filePreviewImageView,
@@ -422,6 +422,8 @@ class NCOperationDownloadThumbnail: ConcurrentOperation {
                             animations: { filePreviewImageView.image = imageIcon! },
                             animations: { filePreviewImageView.image = imageIcon! },
                             completion: nil)
                             completion: nil)
                     }
                     }
+                } else {
+                    print("oh oh oh ")
                 }
                 }
                 
                 
                 self.finish()
                 self.finish()