marinofaggiana 4 年之前
父節點
當前提交
405e433810
共有 1 個文件被更改,包括 1 次插入0 次删除
  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)