NDui

NDui

359k Downloads

[BUG]: if minimap icon is too slow at being created, it doesn't get added to the minimap "recyclebin" toolbar.

JourneyOver opened this issue ยท 3 comments

commented

Have come across an Addon that doesn't get added to the minimap icon toolbar. I first brought the issue up to the dev of said addon and he said he would look into it and see if it was an issue with his addon or with NDui.

End of the day he said he took a look through things, and has determined the issue to be on the side of NDui with how you store the minimap icons.

Explanation below and link to said explanation as well:

After reviewing both my code and the code in NDui, I believe the issue is on NDui's side. My addon takes it's time at startup to get the minimap button created. This is mostly due to my need to ensure I have made all of the necessary changes to my databases on new releases, ie handling changes in the lower level databases for new features. I could try to make my startup sequence faster but I don't think this would necessary solve the problem. I believe currently, this is assuming I could decipher their code in the 15 minutes I looked at it, that NDui at startup looks for minimap icons to store in its "RecycleBin" and then stops looking after that.; at which point I am late to the party. I believe I am within my rights to show up fashionably late and several other ui's and "minimap button grabbers" welcome me to their parties when I do. :)

Hopefully this is a good explanation on things.

Edit2: Not sure if this edit part is on your end or not on WoW Money Statistics side (have reported this second part over to the devs of said addon as well) but if upping the timer for CollectRubbish/SortRubbish it ends up making the icon of the addon in question move over the chat section when setting the minimap icon for the addon to not be locked.

commented

I might collect buttons on each click.

commented

I might collect buttons on each click.

So kjs6x2 the dev of the addon this issue is mainly about messed around with the code block I mentioned in the OP, and he ended up finding a solution. Changing these lines

From

	C_Timer.After(.3, function()
		CollectRubbish()
		SortRubbish()
	end)

to

	C_Timer.NewTicker(.3, function()
		CollectRubbish()
		SortRubbish()
	end, 10)

ends up actually fixing both the issue with it not being collected by the CollectRubbish bit but it actually puts it in the "RecycleBin" as well, when before with my Edit2 issue I was trying I was just changing the .3 to be a higher number.

So Maybe the above code change is a more simple solution instead? @siweia

commented

@siweia it looks like your refactor of the minimap recycle bin fixed the issue, and I haven't noticed any adverse effects either yet. So I guess we can close this if you want?