From 4bd237abef1febba4fcafc4ab2e3f28318061a11 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Tue, 20 May 2025 20:19:41 +0200 Subject: [PATCH] Hook friends list show to NOT show while we're waiting for who results --- Modules/Whoer.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Modules/Whoer.lua b/Modules/Whoer.lua index 686e944..a227009 100644 --- a/Modules/Whoer.lua +++ b/Modules/Whoer.lua @@ -16,6 +16,7 @@ local ModuleName = "Whoer" ---@field updateTicker Timer? ---@field whoTicker Timer? +local whoWaiting = false ---@class Whoer shared.Whoer = { Init = function() @@ -646,7 +647,8 @@ shared.Whoer = { end -- Turns out WA cannot do this ( -- aura_env.UpdateMacro() - _G["FriendsFrameCloseButton"]:Click() + -- No longer needed with the hook to friends frame show + -- _G["FriendsFrameCloseButton"]:Click() end) do @@ -698,8 +700,10 @@ shared.Whoer = { whoQueryIdx = whoQueryIdx + 1 if whoQueryIdx > #shared.WhoQueryService.queries then whoQueryIdx = 1 end lastQuery = query + whoWaiting = true ---@diagnostic disable-next-line: param-type-mismatch SetWhoToUI(1) + SetWhoToUI(1) SendWho(query.query) end local function Tick() @@ -708,6 +712,11 @@ shared.Whoer = { end Tick() end + 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 print("[Heimdall] Whoer loaded") end,