mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-04 09:56:54 +00:00
One-shot event handlers: use EventUtil.RegisterOnceFrameEventAndCallback instead of self-unregistering frames
This commit is contained in:
Vendored
+1
-4
@@ -935,14 +935,11 @@ pfUI_profiles["Adapta"].new_module_positions = pfUI_profiles["Modern"].new_modul
|
||||
|
||||
|
||||
-- overwrite core profiles in userdata
|
||||
local profile_loader = CreateFrame("Frame")
|
||||
profile_loader:RegisterEvent("VARIABLES_LOADED")
|
||||
profile_loader:SetScript("OnEvent", function()
|
||||
EventUtil.RegisterOnceFrameEventAndCallback("VARIABLES_LOADED", function()
|
||||
pfUI_profiles["Modern"] = modern
|
||||
pfUI_profiles["Nostalgia"] = nostalgia
|
||||
pfUI_profiles["Legacy"] = legacy
|
||||
pfUI_profiles["Adapta"] = adapta
|
||||
pfUI_profiles["Light"] = light
|
||||
pfUI_profiles["Slim"] = slim
|
||||
this:UnregisterAllEvents()
|
||||
end)
|
||||
Reference in New Issue
Block a user