Skip to content

Commit

Permalink
-removed who lib's /who command to let the standard interface handle
Browse files Browse the repository at this point in the history
this correctly for us
  • Loading branch information
Ceron257 committed Oct 3, 2019
1 parent 4225f55 commit 8a44abb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CensusPlusClassic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2414,6 +2414,7 @@ function CensusPlus_ProcessWhoResults(result, numWhoResults)
local tmpGldend = nil
local relationship = nil
if (CensusPlus_WHOPROCESSOR == CP_libwho) then
if (result[i] == nil) then return end
name = result[i].Name
realm = CensusPlus_GetUniqueRealmName()
guild = result[i].Guild
Expand Down Expand Up @@ -3598,7 +3599,6 @@ function ManualWho()
})
WhoFrameEditBox:SetText(whoMsg)
WhoFrameWhoButton:Click()
WhoFrame:GetParent():Hide()

This comment has been minimized.

Copy link
@christophrus

christophrus Nov 17, 2019

Owner

@Ceron257 Do you remember why you removed this line? Doesn't have it the potential to fix the issue with the whoframe randomly popping up on a manual who?

This comment has been minimized.

Copy link
@Ceron257

Ceron257 Nov 18, 2019

Author Contributor

Yeah I removed it because this isn't the right place for this line to fix the issue. The who request was sent to the server but the answer hasn't yet arrived so the window won't be open, thus the line would only close the window if it was already open.

Nonetheless even in the right place this wouldn't fix the issue. It would just cure a symptom and not the disease itself. You would have to find out why exactly the window is showing and fix that root cause.


Edit: All I can tell you so far is that I had the code modified to print out the call stack every time the window opens and it was opened when the response from the server came, but I was not able to find out if it is fixable.

end
end
end
Expand Down
30 changes: 15 additions & 15 deletions libs/LibWho-2.0/LibWho-2.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -755,19 +755,19 @@ end
--- slash commands
---

SlashCmdList['WHO'] = function(msg)
dbg("console /who: "..msg)
-- new /who function
--local self = lib

if(msg == '')then
lib:GuiWho(WhoFrame_GetDefaultWhoCommand())
elseif(WhoFrame:IsVisible())then
lib:GuiWho(msg)
else
lib:ConsoleWho(msg)
end
end
--SlashCmdList['WHO'] = function(msg)
-- dbg("console /who: "..msg)
-- -- new /who function
-- --local self = lib
--
-- if(msg == '')then
-- lib:GuiWho(WhoFrame_GetDefaultWhoCommand())
-- elseif(WhoFrame:IsVisible())then
-- lib:GuiWho(msg)
-- else
-- lib:ConsoleWho(msg)
-- end
--end

SlashCmdList['WHOLIB_DEBUG'] = function()
-- /wholibdebug: toggle debug on/off
Expand Down Expand Up @@ -918,8 +918,8 @@ FriendsFrame:UnregisterEvent("WHO_LIST_UPDATE")

function lib:WHO_LIST_UPDATE()
if not lib.Quiet then
WhoList_Update()
FriendsFrame_Update()
WhoList_Update()
FriendsFrame_Update()
end

lib:ProcessWhoResults()
Expand Down

0 comments on commit 8a44abb

Please sign in to comment.