Renable old feature: Display complete names on profiles

This commit is contained in:
Liru Færs
2019-10-10 02:48:30 -04:00
parent e0883b72dc
commit 0409a81e36
3 changed files with 8 additions and 2 deletions

View File

@@ -81,8 +81,10 @@ void LLNameUI::setNameText()
}
else
{
got_name = LLAvatarNameCache::getNSName(mNameID, name);
if (!got_name)
LLAvatarName av_name;
if (got_name = LLAvatarNameCache::get(mNameID, &av_name))
name = mShowCompleteName ? av_name.getCompleteName() : av_name.getNSName();
else
mConnection = LLAvatarNameCache::get(mNameID, boost::bind(&LLNameUI::setNameText, this));
}

View File

@@ -56,6 +56,8 @@ struct LLNameUI : public LFIDBearer
void refresh(const LLUUID& id, const std::string& full_name, bool is_group);
static void refreshAll(const LLUUID& id, const std::string& full_name, bool is_group);
void setShowCompleteName(bool show) { mShowCompleteName = show; }
virtual void setText(const std::string& text) = 0;
// Take either UUID or a map of "id" to UUID and "group" to boolean
@@ -72,6 +74,7 @@ struct LLNameUI : public LFIDBearer
private:
static std::set<LLNameUI*> sInstances;
boost::signals2::connection mConnection;
bool mShowCompleteName = false;
protected:
LLUUID mNameID;

View File

@@ -1280,6 +1280,7 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id)
if (LLDropTarget* drop_target = findChild<LLDropTarget>("drop_target_rect"))
drop_target->setEntityID(mAvatarID);
dnname->setShowCompleteName(gSavedSettings.getBOOL("SinguCompleteNameProfiles"));
if (auto key_edit = getChildView("avatar_key"))
key_edit->setValue(mAvatarID.asString());