AdiBags

AdiBags

8M Downloads

Manual filters display blanks for most items

SpareSimian opened this issue ยท 4 comments

commented

Addon Version

v1.10.4

World of Warcraft Version

Retail

Describe the bug

The configuration page for Filters/Manual filtering/Miscellaneous fails to draw the "pocket" and item icon for most of the filters. This has been here a long time and isn't a recent bug. I think this is a continuation of issue #358.
WoWScrnShot_011123_171148

Steps to reproduce

Open config to a manual filter.

Verification

  • I have disabled all other addons and made sure this bug is triggered only with AdiBags enabled
commented

Since this is a visual bug, it's worth noting that I play in a window occupying about 60% of a 4k screen.

commented

Do the missing icons mostly comprise of items you no longer have in your inventory, by chance?

commented

Ah, quite possibly. So this is possibly another case of the item cache not catching up. I have an addon of my own I've been trying to solve that problem with, where the items are in the guild vault, and the first display of the addon results in an empty frame. I'd love to find a way to fix that.

commented

Take a look at the bottom of this page:

https://wowpedia.fandom.com/wiki/API_GetItemInfo

Specifically:

local item = Item:CreateFromItemID(21524)

item:ContinueOnItemLoad(function()
	local name = item:GetItemName() 
	local icon = item:GetItemIcon()
	print(name, icon) -- "Red Winter Hat", 133169
end)

The item cache is asynchronous in nature. You need to create a new item mixin, and then use the callback to load item details. You can use the following:

https://github.com/Gethe/wow-ui-source/blob/live/Interface/FrameXML/ObjectAPI/ContinuableContainer.lua

To load multiple items at once and do a single callback when finished. AdiBags will take advantage of this eventually, but some refactoring needs to happen before we do.