From d4fd72ec7122cc9565d449bbb4bdf15980dd841a Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Tue, 20 May 2025 20:12:04 +0200 Subject: [PATCH] Hook friends list show to NOT show while we're waiting for who This way no window spop up :D --- Modules/Whoer.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Modules/Whoer.lua b/Modules/Whoer.lua index a18fafc..8a738c9 100644 --- a/Modules/Whoer.lua +++ b/Modules/Whoer.lua @@ -8,6 +8,8 @@ function shared.Whoer.Init() if not Heimdall_Data.who then Heimdall_Data.who = {} end if not Heimdall_Data.who.data then Heimdall_Data.who.data = {} end + local whoWaiting = false + ---@type table HeimdallStinkies = {} @@ -583,7 +585,8 @@ function shared.Whoer.Init() end -- Turns out WA cannot do this ( -- aura_env.UpdateMacro() - _G["FriendsFrameCloseButton"]:Click() + -- We MAY not need this + -- _G["FriendsFrameCloseButton"]:Click() end) do @@ -635,13 +638,21 @@ function shared.Whoer.Init() lastQuery = query ---@diagnostic disable-next-line: param-type-mismatch SetWhoToUI(1) + SetWhoToUI(1) SendWho(query.query) + whoWaiting = true end local function Tick() DoQuery() C_Timer.NewTimer(1, Tick, 1) end 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 print("[Heimdall] Whoer loaded")