Overview should also use calculated equivalent counts
This commit is contained in:
+13
-2
@@ -495,6 +495,17 @@ local function getEquivalentLevelCounts(baseId, pageItems, itemCounts)
|
||||
return equivalentCounts
|
||||
end
|
||||
|
||||
local function getEquivalentBaseCounts(baseIds, itemCounts)
|
||||
local equivalentCounts = {}
|
||||
|
||||
for i = 1, #baseIds do
|
||||
local baseId = baseIds[i]
|
||||
equivalentCounts[baseId] = getBaseEquivalentCount(baseId, itemCounts)
|
||||
end
|
||||
|
||||
return equivalentCounts
|
||||
end
|
||||
|
||||
local function createGlobalCountRefreshJob()
|
||||
ensureChainsLoaded()
|
||||
|
||||
@@ -1146,7 +1157,7 @@ drawOverview = function()
|
||||
local counts = getGlobalItemCounts()
|
||||
|
||||
if next(counts) ~= nil then
|
||||
overviewCachedCounts = counts
|
||||
overviewCachedCounts = getEquivalentBaseCounts(items, counts)
|
||||
end
|
||||
|
||||
return overviewCachedCounts
|
||||
@@ -1159,7 +1170,7 @@ drawOverview = function()
|
||||
overviewScrollTargetRow = targetRow
|
||||
end,
|
||||
getEntriesAndCountsFromCache = function()
|
||||
overviewCachedCounts = getGlobalItemCounts()
|
||||
overviewCachedCounts = getEquivalentBaseCounts(items, getGlobalItemCounts())
|
||||
overviewCachedSortedItemIds = sortOverviewItems(overviewCachedCounts)
|
||||
return overviewCachedSortedItemIds, overviewCachedCounts
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user