marinofaggiana 4 lat temu
rodzic
commit
fda9af7c68

+ 3 - 3
iOSClient/Favorites/NCFavorite.swift

@@ -71,10 +71,10 @@ class NCFavorite: NCCollectionViewCommon  {
         metadataPush = metadata
         
         if isEditMode {
-            if let index = selectocId.firstIndex(of: metadata.ocId) {
-                selectocId.remove(at: index)
+            if let index = selectOcId.firstIndex(of: metadata.ocId) {
+                selectOcId.remove(at: index)
             } else {
-                selectocId.append(metadata.ocId)
+                selectOcId.append(metadata.ocId)
             }
             collectionView.reloadItems(at: [indexPath])
             return

+ 2 - 2
iOSClient/Main/NCCollectionCommon.swift

@@ -558,7 +558,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, NCL
        
     internal var metadataPush: tableMetadata?
     internal var isEditMode = false
-    internal var selectocId: [String] = []
+    internal var selectOcId: [String] = []
         
     internal var dataSource: NCDataSource?
         
@@ -1005,7 +1005,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
         
         let shares = NCManageDatabase.sharedInstance.getTableShares(account: metadata.account, serverUrl: metadata.serverUrl, fileName: metadata.fileName)
         
-        NCCollectionCommon.shared.cellForItemAt(indexPath: indexPath, collectionView: collectionView, cell: cell, metadata: metadata, metadataFolder: nil, serverUrl: metadata.serverUrl, isEditMode: isEditMode, selectocId: selectocId, autoUploadFileName: autoUploadFileName, autoUploadDirectory: autoUploadDirectory, hideButtonMore: false, downloadThumbnail: true, shares: shares, source: self)
+        NCCollectionCommon.shared.cellForItemAt(indexPath: indexPath, collectionView: collectionView, cell: cell, metadata: metadata, metadataFolder: nil, serverUrl: metadata.serverUrl, isEditMode: isEditMode, selectocId: selectOcId, autoUploadFileName: autoUploadFileName, autoUploadDirectory: autoUploadDirectory, hideButtonMore: false, downloadThumbnail: true, shares: shares, source: self)
         
         return cell
     }

+ 3 - 3
iOSClient/Offline/NCOffline.swift

@@ -84,10 +84,10 @@ class NCOffline: NCCollectionViewCommon  {
         metadataPush = metadata
         
         if isEditMode {
-            if let index = selectocId.firstIndex(of: metadata.ocId) {
-                selectocId.remove(at: index)
+            if let index = selectOcId.firstIndex(of: metadata.ocId) {
+                selectOcId.remove(at: index)
             } else {
-                selectocId.append(metadata.ocId)
+                selectOcId.append(metadata.ocId)
             }
             collectionView.reloadItems(at: [indexPath])
             return