Detecting if addon updated wihout game restart logic fails in Questie.lua
Laumesis opened this issue ยท 1 comments
Lines 69 to 116 in 60ef402
Those all always evaluate to true as table reference is assigned to each few lines earlier by for example:
local QuestieLib = QuestieLoader:ImportModule("QuestieLib");
Both function QuestieLoader:ImportModule(name)
and function QuestieLoader:CreateModule(name)
are identical functions currently, so both initialize a module same way:
Questie/Modules/Libs/QuestieLoader.lua
Lines 14 to 18 in 60ef402
Note: versionCheck.lua
should check version okey. But I am not sure if it will display error? Does StaticPopup_Show() work always okey at middle of addon loading process while game UI is not necessary available yet? Should it also or instead add timer and chat messages?
versionCheck.lua
error message styles should be unified. Maybe add function to call with a message and it will handle passing it to UI / user.
v6.5.1
Haha, great finding @Laumesis :D Yes, the ImportModule
and CreateModule
functions are the same, as we were not sure how to progress with the QuestieLoader (e.g. making it fail, when Import is called before Create).
I hate this way of determining if Questie has all the required modules and now that you point out it never worked, I am willing to simply remove all of it. It is also a very exhausting to maintain this if-block and I bet there are already multiple modules missing in the check.
From what I experienced StaticPopup_Show
works even while Questie is still loading up. The game UI is ready when the files are processed. Drejjmit already stated that TOC version updates are loaded on /reload
, but file changes are not, which sounded odd and should also be investigated.
We need to find a clever and solid solution to remind users that they didn't restart the game after an update.