From 6a39e621c4c8348ed2eb9e9bb6b99e1ace6211fd Mon Sep 17 00:00:00 2001 From: Benedikt Ziemons Date: Sun, 2 Jun 2024 20:48:00 +0200 Subject: [PATCH] fixup! [listframes] cache estimatedTotalHeight --- listframes.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/listframes.lua b/listframes.lua index 07aab67..58f18ee 100644 --- a/listframes.lua +++ b/listframes.lua @@ -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