marinofaggiana před 4 roky
rodič
revize
405e433810
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      iOSClient/Media/NCMedia.swift

+ 1 - 0
iOSClient/Media/NCMedia.swift

@@ -1025,6 +1025,7 @@ class NCGridMediaLayout: UICollectionViewFlowLayout {
                 }
                 
                 frameWidth = collectionView.frame.width
+                if itemForLine <= 0 { itemForLine = 1 }
                 itemWidth = (frameWidth - marginLeftRight * 2 - marginLeftRight * (itemForLine - 1)) / itemForLine
                 
                 return CGSize(width: itemWidth, height: itemWidth)