Skip to content

Commit

Permalink
Show location if gameText is empty for Real ID friends
Browse files Browse the repository at this point in the history
This mirrors what the built-in friends panel does.
  • Loading branch information
lilyball committed Jun 7, 2016
1 parent 0ed185a commit 7679f27
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions TitanSocial.lua
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,8 @@ end
-- class,
-- zone,
-- level,
-- gameText
-- gameText,
-- location -- gameText, or zone if gameText is "" or nil
-- },
-- alts: nil or non-empty array of tables identical to focus,
-- bnet: nil or table identical to focus
Expand Down Expand Up @@ -681,7 +682,8 @@ local function parseRealID(filterClients)
class = class,
zone = zoneName,
level = level,
gameText = gameText
gameText = gameText,
location = gameText == "" and zoneName or gameText
}
seen[bnetIDGameAccount] = toon
if client == "App" then
Expand Down Expand Up @@ -867,7 +869,7 @@ local function addRealID(tooltip, friends, isBnetClient, collapseVar)
end

-- Location
local right = focus.gameText and ("|cffFFFFFF"..focus.gameText.."|r") or ""
local right = focus.location and focus.location ~= "" and ("|cffFFFFFF"..focus.location.."|r") or ""

local y = tooltip:AddLine(check, level, left, right)
tooltip:SetLineScript(y, "OnMouseDown", clickRealID, { friend.presenceName, friend.presenceID })
Expand All @@ -894,7 +896,7 @@ local function addRealID(tooltip, friends, isBnetClient, collapseVar)
left = toon.name
end
left = getFactionIndicator(toon.faction, toon.client).."|cffFEE15C"..FRIENDS_LIST_PLAYING.."|cffFFFFFF "..(left or "Unknown").."|r"
right = "|cffFFFFFF"..(toon.gameText or "").."|r"
right = "|cffFFFFFF"..(toon.location or "").."|r"
addDoubleLine(true, left, right)
end
end
Expand Down

0 comments on commit 7679f27

Please sign in to comment.