thirdparty: fix clean_up loading order issue

This commit is contained in:
shagu
2016-12-23 10:36:38 +01:00
parent 01d541ba05
commit d606554565
+17 -3
View File
@@ -293,10 +293,9 @@ pfUI:RegisterModule("thirdparty", function ()
end
end)
-- CleanUp Integration
-- Integrate CleanUp bag sorting into pfUI
if Clean_Up and pfUI_config.thirdparty.cleanup.enable == "1" then
local function pfSetupClean_Up()
pfUI.thirdparty.cleanup = CreateFrame("Frame", nil)
pfUI.thirdparty.cleanup:RegisterEvent("BAG_UPDATE")
pfUI.thirdparty.cleanup:RegisterEvent("PLAYER_ENTERING_WORLD")
@@ -378,4 +377,19 @@ pfUI:RegisterModule("thirdparty", function ()
end
end)
end
end)
if pfUI_config.thirdparty.cleanup.enable == "1" then
if Clean_Up then
pfSetupClean_Up()
else
local pfHookClean_Up = CreateFrame("Frame", nil)
pfHookClean_Up:RegisterEvent("VARIABLES_LOADED")
pfHookClean_Up:SetScript("OnEvent",function()
if Clean_Up then
pfHookClean_Up:UnregisterEvent("VARIABLES_LOADED")
pfSetupClean_Up()
end
end)
end
end
end)