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 updateTicker Timer?
|
||||||
---@field whoTicker Timer?
|
---@field whoTicker Timer?
|
||||||
|
|
||||||
|
local whoWaiting = false
|
||||||
---@class Whoer
|
---@class Whoer
|
||||||
shared.Whoer = {
|
shared.Whoer = {
|
||||||
Init = function()
|
Init = function()
|
||||||
@@ -646,7 +647,8 @@ shared.Whoer = {
|
|||||||
end
|
end
|
||||||
-- Turns out WA cannot do this (
|
-- Turns out WA cannot do this (
|
||||||
-- aura_env.UpdateMacro()
|
-- aura_env.UpdateMacro()
|
||||||
_G["FriendsFrameCloseButton"]:Click()
|
-- No longer needed with the hook to friends frame show
|
||||||
|
-- _G["FriendsFrameCloseButton"]:Click()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -698,8 +700,10 @@ shared.Whoer = {
|
|||||||
whoQueryIdx = whoQueryIdx + 1
|
whoQueryIdx = whoQueryIdx + 1
|
||||||
if whoQueryIdx > #shared.WhoQueryService.queries then whoQueryIdx = 1 end
|
if whoQueryIdx > #shared.WhoQueryService.queries then whoQueryIdx = 1 end
|
||||||
lastQuery = query
|
lastQuery = query
|
||||||
|
whoWaiting = true
|
||||||
---@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)
|
||||||
end
|
end
|
||||||
local function Tick()
|
local function Tick()
|
||||||
@@ -708,6 +712,11 @@ shared.Whoer = {
|
|||||||
end
|
end
|
||||||
Tick()
|
Tick()
|
||||||
end
|
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")
|
print("[Heimdall] Whoer loaded")
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user