Eliote / SimpleAddonManager

A simple to use Addon Manager with profile, search, category filter, and more.
https://www.curseforge.com/wow/addons/simple-addon-manager
MIT License
4 stars 3 forks source link

Fix Addon Loading for specific Characters #36

Closed Tubly closed 5 months ago

Tubly commented 5 months ago

Hi,

this is my first Pull Request so i hope everything is fine and sorry for my bad english :)

In my Opinion the initial loading state for Specific Characters Addons was wrong. Addons which are Loaded by the Character showed as "Modified".

So after the PLAYER_ENTERING_WORLD Event where i have the playerName i add the InitialState Function. Addons which were marked as "Modfied" but loaded by the Character are not showed as "Modified".

Without Bugfix on Entering World: image

With Bugfix on Entering World: image

I haven't tested it much.

Eliote commented 5 months ago

Hello, Thanks for the pull request!

Maybe we should also check if the player is in the initial login or reloading ui. PLAYER_ENTERING_WORLD also triggers when changing map.

Something like:

local isInitialLogin, isReloadingUi = ...
if (isInitialLogin or isReloadingUi) then
   -- update initial state...
end
Tubly commented 5 months ago

thank you for your input!

I changed it as requested! 😄

And thank you for creating this Addon!!!