mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 01:10:09 +00:00
Fix grid layout
This commit is contained in:
parent
6d27651b84
commit
3d385c94bd
@ -543,8 +543,8 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate {
|
|||||||
|
|
||||||
if let (height, fillWidth) = item.fillsRowWithHeight {
|
if let (height, fillWidth) = item.fillsRowWithHeight {
|
||||||
if fillWidth {
|
if fillWidth {
|
||||||
if nextItemOrigin.x > 0.0 {
|
if nextItemOrigin.x > initialSpacing + itemInsets.left {
|
||||||
nextItemOrigin.x = 0.0
|
nextItemOrigin.x = initialSpacing + itemInsets.left
|
||||||
nextItemOrigin.y += itemSize.height + lineSpacing
|
nextItemOrigin.y += itemSize.height + lineSpacing
|
||||||
contentSize.height += itemSize.height + lineSpacing
|
contentSize.height += itemSize.height + lineSpacing
|
||||||
}
|
}
|
||||||
@ -553,7 +553,7 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate {
|
|||||||
itemSize.height = height
|
itemSize.height = height
|
||||||
} else if let fillsRowWithDynamicHeight = item.fillsRowWithDynamicHeight {
|
} else if let fillsRowWithDynamicHeight = item.fillsRowWithDynamicHeight {
|
||||||
let height = fillsRowWithDynamicHeight(gridLayout.size.width)
|
let height = fillsRowWithDynamicHeight(gridLayout.size.width)
|
||||||
nextItemOrigin.x = 0.0
|
nextItemOrigin.x = initialSpacing + itemInsets.left
|
||||||
itemSize.width = gridLayout.size.width
|
itemSize.width = gridLayout.size.width
|
||||||
itemSize.height = height
|
itemSize.height = height
|
||||||
} else if index == 0 {
|
} else if index == 0 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user