marinofaggiana 4 년 전
부모
커밋
0de19e5703
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      iOSClient/Main/Collection/NCCollectionCommon.swift

+ 2 - 2
iOSClient/Main/Collection/NCCollectionCommon.swift

@@ -250,8 +250,8 @@ class NCCollectionCommon: NSObject {
             var totalBytes: Double = 0.0
             let progressArray = appDelegate.listProgressMetadata.object(forKey: metadata.ocId) as? NSArray
             if progressArray != nil && progressArray?.count == 3 {
-                progress = progressArray?.object(at: 0) as! Float
-                totalBytes = progressArray?.object(at: 1) as! Double
+                progress = progressArray?.object(at: 0) as? Float ?? 0
+                totalBytes = progressArray?.object(at: 1) as? Double ?? 0
             }
             if metadata.status == k_metadataStatusInDownload || metadata.status == k_metadataStatusDownloading ||  metadata.status >= k_metadataStatusTypeUpload {
                 cell.progressView.isHidden = false