Marino Faggiana 6 years ago
parent
commit
68ac31ea9f
1 changed files with 7 additions and 10 deletions
  1. 7 10
      iOSClient/Offline/NCOffline.swift

+ 7 - 10
iOSClient/Offline/NCOffline.swift

@@ -518,16 +518,6 @@ class NCOffline: UIViewController ,UICollectionViewDataSource, UICollectionViewD
         return datasource.count
     }
     
-    /*
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
-        if section == 0 {
-            return UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
-        } else {
-            return UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
-        }
-    }
-    */
-    
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
         
         var image: UIImage?
@@ -585,6 +575,13 @@ class NCOffline: UIViewController ,UICollectionViewDataSource, UICollectionViewD
                 cell.backgroundView = nil
             }
             
+            // Remove last separator
+            if collectionView.numberOfItems(inSection: indexPath.section) == indexPath.row + 1 {
+                cell.separator.isHidden = true
+            } else {
+                cell.separator.isHidden = false
+            }
+            
             return cell
         
         } else {