mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various fixes
This commit is contained in:
@@ -492,7 +492,7 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate {
|
||||
|
||||
let effectiveWidth = gridLayout.size.width - itemInsets.left - itemInsets.right
|
||||
|
||||
let itemsInRow = Int(effectiveWidth / defaultItemSize.width)
|
||||
let itemsInRow = max(1, Int(effectiveWidth / defaultItemSize.width))
|
||||
let itemsInRowWidth = CGFloat(itemsInRow) * defaultItemSize.width
|
||||
let remainingWidth = max(0.0, effectiveWidth - itemsInRowWidth)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user