DEV-50013 WIP Added utility to get name and SLID in single string
parent
d36cffcb7b
commit
6b00537c87
|
|
@ -79,3 +79,18 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
|
|||
LLDate expires = sd[DISPLAY_NAME_EXPIRES];
|
||||
mExpires = expires.secondsSinceEpoch();
|
||||
}
|
||||
|
||||
std::string LLAvatarName::getNameAndSLID() const
|
||||
{
|
||||
std::string name;
|
||||
if (!mSLID.empty())
|
||||
{
|
||||
name = mDisplayName + " (" + mSLID + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
// ...display names are off, legacy name is in mDisplayName
|
||||
name = mDisplayName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@ public:
|
|||
|
||||
void fromLLSD(const LLSD& sd);
|
||||
|
||||
// For normal names, returns "James Linden (james.linden)"
|
||||
// When display names are disabled returns just "James Linden"
|
||||
std::string getNameAndSLID() const;
|
||||
|
||||
// "bobsmith123" or "james.linden", US-ASCII only
|
||||
std::string mSLID;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue