marinofaggiana 4 yıl önce
ebeveyn
işleme
cd70033aae

+ 3 - 1
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -526,7 +526,9 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
                     if let row = dataSource.deleteMetadata(ocId: ocId) {
                         let indexPath = IndexPath(row: row, section: 0)
                         collectionView?.performBatchUpdates({
-                            collectionView?.deleteItems(at: [indexPath])
+                            if indexPath.section < (collectionView?.numberOfSections ?? 0) && indexPath.row < (collectionView?.numberOfItems(inSection: indexPath.section) ?? 0) {
+                                collectionView?.deleteItems(at: [indexPath])
+                            }
                         }, completion: { (_) in
                             self.collectionView?.reloadData()
                         })