Remove query pending mechanism from whoer
This commit is contained in:
@@ -123,7 +123,6 @@ function shared.Whoer.Init()
|
|||||||
{ NotSiegeOfOrgrimmarFilter, AllianceFilter }),
|
{ NotSiegeOfOrgrimmarFilter, AllianceFilter }),
|
||||||
WHOQuery.new("Kekv Demonboo Dotmada Firobot Verminal Amaterasu Freexe Tomoki", {})
|
WHOQuery.new("Kekv Demonboo Dotmada Firobot Verminal Amaterasu Freexe Tomoki", {})
|
||||||
}
|
}
|
||||||
local queryPending = false
|
|
||||||
local ttl = #whoQueries * 2
|
local ttl = #whoQueries * 2
|
||||||
---@type WHOQuery?
|
---@type WHOQuery?
|
||||||
local lastQuery = nil
|
local lastQuery = nil
|
||||||
@@ -243,7 +242,6 @@ function shared.Whoer.Init()
|
|||||||
local frame = CreateFrame("Frame")
|
local frame = CreateFrame("Frame")
|
||||||
frame:RegisterEvent("WHO_LIST_UPDATE")
|
frame:RegisterEvent("WHO_LIST_UPDATE")
|
||||||
frame:SetScript("OnEvent", function(self, event, ...)
|
frame:SetScript("OnEvent", function(self, event, ...)
|
||||||
queryPending = false
|
|
||||||
if not Heimdall_Data.config.who.enabled then return end
|
if not Heimdall_Data.config.who.enabled then return end
|
||||||
---@type WHOQuery?
|
---@type WHOQuery?
|
||||||
local query = lastQuery
|
local query = lastQuery
|
||||||
@@ -343,12 +341,6 @@ function shared.Whoer.Init()
|
|||||||
do
|
do
|
||||||
local function DoQuery()
|
local function DoQuery()
|
||||||
if not Heimdall_Data.config.who.enabled then return end
|
if not Heimdall_Data.config.who.enabled then return end
|
||||||
if queryPending then
|
|
||||||
print("Tried running a who query while one is already pending, previous query:")
|
|
||||||
shared.dumpTable(lastQuery)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
queryPending = true
|
|
||||||
|
|
||||||
local query = whoQueries[whoQueryIdx]
|
local query = whoQueries[whoQueryIdx]
|
||||||
whoQueryIdx = whoQueryIdx + 1
|
whoQueryIdx = whoQueryIdx + 1
|
||||||
|
Reference in New Issue
Block a user