From 660b1d27bd0cd9f2ab06a181c56f39a69b69e96a Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Mon, 25 Jan 2021 17:34:57 +0300 Subject: [PATCH] Fix grid layout for group sticker pack setup --- submodules/Display/Source/GridNode.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/submodules/Display/Source/GridNode.swift b/submodules/Display/Source/GridNode.swift index 176a547e77..42094789fb 100644 --- a/submodules/Display/Source/GridNode.swift +++ b/submodules/Display/Source/GridNode.swift @@ -497,6 +497,9 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate { var nextItemOrigin = CGPoint(x: initialSpacing + itemInsets.left, y: 0.0) var index = 0 var previousSection: GridSection? + + var previousFillsRow = false + for item in self.items { var itemSize = defaultItemSize @@ -508,6 +511,12 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate { keepSection = false } + + if !previousFillsRow && item.fillsRowWithDynamicHeight != nil { + keepSection = false + } + previousFillsRow = item.fillsRowWithDynamicHeight != nil + if !keepSection { if incrementedCurrentRow { nextItemOrigin.x = initialSpacing + itemInsets.left