Skip to content

Commit

Permalink
workaround Plexus delayed layout
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuds committed Jan 24, 2022
1 parent 6c1063a commit 3f4dc33
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions LibGetFrame-1.0.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local MAJOR_VERSION = "LibGetFrame-1.0"
local MINOR_VERSION = 30
local MINOR_VERSION = 31
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
local lib = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
if not lib then return end
Expand Down Expand Up @@ -157,11 +157,11 @@ local function doScanForUnitFrames()
end
end
end
local function ScanForUnitFrames(noDelay)
if noDelay then
doScanForUnitFrames()
elseif not wait then
local function ScanForUnitFrames()
doScanForUnitFrames()
if not wait then
wait = true
-- do another delayed scan due to Plexus and Vuhdo sometime delayed layout
C_Timer.After(1, function()
doScanForUnitFrames()
end)
Expand Down Expand Up @@ -244,8 +244,8 @@ local function Init(noDelay)
GetFramesCacheListener:RegisterEvent("PLAYER_ENTERING_WORLD")
GetFramesCacheListener:RegisterEvent("GROUP_ROSTER_UPDATE")
GetFramesCacheListener:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT")
GetFramesCacheListener:SetScript("OnEvent", function() ScanForUnitFrames(false) end)
ScanForUnitFrames(noDelay)
GetFramesCacheListener:SetScript("OnEvent", function() ScanForUnitFrames() end)
ScanForUnitFrames()
end

function lib.GetUnitFrame(target, opt)
Expand Down

0 comments on commit 3f4dc33

Please sign in to comment.