diff --git a/itemcontroller.lua b/itemcontroller.lua index f157d74..cea4472 100644 --- a/itemcontroller.lua +++ b/itemcontroller.lua @@ -594,13 +594,13 @@ local PAGES = { storageSatProgress:setProgress(1 - (emptyCount / totalCount)) local basePageIndex = (pageState.currentPage - 1) * groupEntryListBudget - local pageEntryCount = math.min(groupEntryListBudget, totalCount - basePageIndex) for i=1,groupEntryListBudget do - local isVisible = i <= pageEntryCount + local group = pageState.stacks[basePageIndex + i] + + local isVisible = group ~= nil local listEntry = mainList:findById(tostring(i)) listEntry:setVisible(isVisible) if isVisible then - local group = pageState.stacks[basePageIndex + i] local nameText = listEntry:findById(GroupEntryID.NAME) local namePadding = listEntry:findById(GroupEntryID.PADDING)