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 xSize, ySize = entryFrame.getSize()
|
||||||
local yEnd = yPos+ySize-1
|
local yEnd = yPos+ySize-1
|
||||||
entryFrame.setVisible(yEnd > 0 and yPos <= th)
|
entryFrame.setVisible(yEnd > 0 and yPos <= th)
|
||||||
|
yEnd = yEnd+paginationPos-1
|
||||||
if yEnd > estimatedTotalHeight then
|
if yEnd > estimatedTotalHeight then
|
||||||
estimatedTotalHeight = yEnd
|
estimatedTotalHeight = yEnd
|
||||||
end
|
end
|
||||||
|
@ -154,7 +155,7 @@ local function estimatedHeight()
|
||||||
if lastEntryFrame ~= nil and lastEntryFrame.isVisible() then
|
if lastEntryFrame ~= nil and lastEntryFrame.isVisible() then
|
||||||
local xPos, yPos = lastEntryFrame.getPosition()
|
local xPos, yPos = lastEntryFrame.getPosition()
|
||||||
local xSize, ySize = lastEntryFrame.getSize()
|
local xSize, ySize = lastEntryFrame.getSize()
|
||||||
estimatedTotalHeight = yPos+ySize-1
|
estimatedTotalHeight = yPos+ySize-1+paginationPos-1
|
||||||
end
|
end
|
||||||
return estimatedTotalHeight
|
return estimatedTotalHeight
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue