Hook friends list show to NOT show while we're waiting for who
This way no window spop up :D
This commit is contained in:
@@ -8,6 +8,8 @@ function shared.Whoer.Init()
|
|||||||
if not Heimdall_Data.who then Heimdall_Data.who = {} end
|
if not Heimdall_Data.who then Heimdall_Data.who = {} end
|
||||||
if not Heimdall_Data.who.data then Heimdall_Data.who.data = {} end
|
if not Heimdall_Data.who.data then Heimdall_Data.who.data = {} end
|
||||||
|
|
||||||
|
local whoWaiting = false
|
||||||
|
|
||||||
---@type table<string, Player>
|
---@type table<string, Player>
|
||||||
HeimdallStinkies = {}
|
HeimdallStinkies = {}
|
||||||
|
|
||||||
@@ -583,7 +585,8 @@ function shared.Whoer.Init()
|
|||||||
end
|
end
|
||||||
-- Turns out WA cannot do this (
|
-- Turns out WA cannot do this (
|
||||||
-- aura_env.UpdateMacro()
|
-- aura_env.UpdateMacro()
|
||||||
_G["FriendsFrameCloseButton"]:Click()
|
-- We MAY not need this
|
||||||
|
-- _G["FriendsFrameCloseButton"]:Click()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -635,13 +638,21 @@ function shared.Whoer.Init()
|
|||||||
lastQuery = query
|
lastQuery = query
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
---@diagnostic disable-next-line: param-type-mismatch
|
||||||
SetWhoToUI(1)
|
SetWhoToUI(1)
|
||||||
|
SetWhoToUI(1)
|
||||||
SendWho(query.query)
|
SendWho(query.query)
|
||||||
|
whoWaiting = true
|
||||||
end
|
end
|
||||||
local function Tick()
|
local function Tick()
|
||||||
DoQuery()
|
DoQuery()
|
||||||
C_Timer.NewTimer(1, Tick, 1)
|
C_Timer.NewTimer(1, Tick, 1)
|
||||||
end
|
end
|
||||||
Tick()
|
Tick()
|
||||||
|
|
||||||
|
local original_FriendsFrame_OnEvent = FriendsFrame_OnEvent
|
||||||
|
local function my_FriendsFrame_OnEvent(event)
|
||||||
|
if not (event == "WHO_LIST_UPDATE" and whoWaiting) then original_FriendsFrame_OnEvent() end
|
||||||
|
end
|
||||||
|
FriendsFrame_OnEvent = my_FriendsFrame_OnEvent
|
||||||
end
|
end
|
||||||
|
|
||||||
print("[Heimdall] Whoer loaded")
|
print("[Heimdall] Whoer loaded")
|
||||||
|
Reference in New Issue
Block a user