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:
@@ -801,11 +801,7 @@ pfUI:RegisterModule("thirdparty-vanilla", function()
|
||||
HookAddon("SortBags", function()
|
||||
if C.thirdparty.sortbags.enable == "0" then return end
|
||||
|
||||
local sort = CreateFrame("Frame", nil)
|
||||
sort:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
sort:SetScript("OnEvent", function()
|
||||
this:UnregisterAllEvents()
|
||||
|
||||
EventUtil.RegisterOnceFrameEventAndCallback("PLAYER_ENTERING_WORLD", function()
|
||||
pfUI.thirdparty.RegisterBagSort("SortBags",
|
||||
function()
|
||||
SortBags()
|
||||
|
||||
Reference in New Issue
Block a user