summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
-rw-r--r--indra/newview/llavatarlist.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index dfb213716c..8801903df7 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -41,6 +41,7 @@
// newview
#include "llavatariconctrl.h"
+#include "llavatarnamecache.h"
#include "llcallingcard.h" // for LLAvatarTracker
#include "llcachename.h"
#include "llrecentpeople.h"
@@ -239,12 +240,15 @@ void LLAvatarList::refresh()
// Handle added items.
unsigned nadded = 0;
+ const std::string waiting_str = LLTrans::getString("AvatarNameWaiting");
+
for (uuid_vec_t::const_iterator it=added.begin(); it != added.end(); it++)
{
- std::string name;
const LLUUID& buddy_id = *it;
- have_names &= (bool)gCacheName->getFullName(buddy_id, name);
- if (!have_filter || findInsensitive(name, mNameFilter))
+ LLAvatarName av_name;
+ have_names &= LLAvatarNameCache::get(buddy_id, &av_name);
+
+ if (!have_filter || findInsensitive(av_name.mDisplayName, mNameFilter))
{
if (nadded >= ADD_LIMIT)
{
@@ -253,7 +257,9 @@ void LLAvatarList::refresh()
}
else
{
- addNewItem(buddy_id, name, LLAvatarTracker::instance().isBuddyOnline(buddy_id));
+ addNewItem(buddy_id,
+ av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName,
+ LLAvatarTracker::instance().isBuddyOnline(buddy_id));
modified = true;
nadded++;
}