Bot file name update, saving height for containers

This commit is contained in:
OTCv8
2020-11-20 14:15:44 +01:00
parent 407553647d
commit 8fa45f387d
3 changed files with 3 additions and 2 deletions

View File

@@ -167,7 +167,8 @@ function onContainerOpen(container, previousContainer)
containerWindow:setContentMinimumHeight(cellSize.height)
containerWindow:setContentMaximumHeight(cellSize.height*layout:getNumLines())
if not previousContainer then
local hasHeightInSettings = containerWindow:getSettings("height")
if not previousContainer and not hasHeightInSettings then
local filledLines = math.max(math.ceil(container:getItemsCount() / layout:getNumColumns()), 1)
containerWindow:setContentHeight(filledLines*cellSize.height)
end