fixup! [listframes] cache estimatedTotalHeight
This commit is contained in:
parent
9c8d245156
commit
6a39e621c4
|
@ -61,6 +61,7 @@ local function redrawEntry(idx)
|
|||
local xSize, ySize = entryFrame.getSize()
|
||||
local yEnd = yPos+ySize-1
|
||||
entryFrame.setVisible(yEnd > 0 and yPos <= th)
|
||||
yEnd = yEnd+paginationPos-1
|
||||
if yEnd > estimatedTotalHeight then
|
||||
estimatedTotalHeight = yEnd
|
||||
end
|
||||
|
@ -154,7 +155,7 @@ local function estimatedHeight()
|
|||
if lastEntryFrame ~= nil and lastEntryFrame.isVisible() then
|
||||
local xPos, yPos = lastEntryFrame.getPosition()
|
||||
local xSize, ySize = lastEntryFrame.getSize()
|
||||
estimatedTotalHeight = yPos+ySize-1
|
||||
estimatedTotalHeight = yPos+ySize-1+paginationPos-1
|
||||
end
|
||||
return estimatedTotalHeight
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue