Hook friends list show to NOT show while we're waiting for who results
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user