From 561e0504742149bf1c4df96a74edd94309659675 Mon Sep 17 00:00:00 2001 From: Ardy Lay Date: Thu, 17 Feb 2011 20:59:33 -0600 Subject: VWR-24917 Use mIsDisplayNameDefault to reduce name redundancy in nearby chat history * Clean up changes based upon feedback from reviewers. * Improve comment based upon feedback from reviewers. --- indra/llcommon/llavatarname.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/llcommon/llavatarname.cpp') diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp index ad1845d387..ba3dd6d6b4 100644 --- a/indra/llcommon/llavatarname.cpp +++ b/indra/llcommon/llavatarname.cpp @@ -90,14 +90,16 @@ void LLAvatarName::fromLLSD(const LLSD& sd) std::string LLAvatarName::getCompleteName() const { std::string name; - if (!mUsername.empty()) + if (mUsername.empty() || mIsDisplayNameDefault) + // If the display name feature is off + // OR this particular display name is defaulted (i.e. based on user name), + // then display only the easier to read instance of the person's name. { - name = mDisplayName + " (" + mUsername + ")"; + name = mDisplayName; } else { - // ...display names are off, legacy name is in mDisplayName - name = mDisplayName; + name = mDisplayName + " (" + mUsername + ")"; } return name; } -- cgit v1.2.3