瀏覽代碼

dev offline

Marino Faggiana 6 年之前
父節點
當前提交
ad8d1c78ff
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      iOSClient/Offline/NCOffline.swift

+ 3 - 4
iOSClient/Offline/NCOffline.swift

@@ -684,13 +684,12 @@ class NCOffline: UIViewController ,UICollectionViewDataSource, UICollectionViewD
     
     override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
         
-        var photoDataSource = [tableMetadata]()
-//        let test = sectionDatasource.allFileID.map { $0 }
+        let photoDataSource: NSMutableArray = []
         
         for fileID: String in sectionDatasource.allFileID as! [String] {
             let metadata = sectionDatasource.allRecordsDataSource.object(forKey: fileID) as! tableMetadata
             if metadata.typeFile == k_metadataTypeFile_image {
-                photoDataSource.append(metadata)
+                photoDataSource.add(metadata)
             }
         }
         
@@ -700,7 +699,7 @@ class NCOffline: UIViewController ,UICollectionViewDataSource, UICollectionViewD
             
             destinationVC.metadataDetail = metadataSelect
             destinationVC.dateFilterQuery = nil
-            destinationVC.photoDataSource = photoDataSource as? NSMutableArray
+            destinationVC.photoDataSource = photoDataSource
             
             destinationVC.title = metadataSelect.fileNameView
         }