From 341ca205296fe76d2476f73cfb6d9051edab3fa4 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 18 Oct 2014 15:05:10 -0400 Subject: [PATCH] Avatar Picker's list of friends should use the friends name system. --- indra/newview/llcallingcard.cpp | 5 ++--- indra/newview/llfloateravatarpicker.cpp | 2 +- indra/newview/llfloaterfriends.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 1481f49b4..91bc47e7b 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -895,11 +895,10 @@ bool LLCollectOnlineBuddies::operator()(const LLUUID& buddy_id, LLRelationship* return true; } +const S32& friend_name_system(); bool LLCollectAllBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy) { - LLAvatarName av_name; - LLAvatarNameCache::get(buddy_id, &av_name); - mFullName = av_name.mDisplayName; + LLAvatarNameCache::getPNSName(buddy_id, mFullName, friend_name_system()); buddy_map_t::value_type value(mFullName, buddy_id); if(buddy->isOnline()) { diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index a7c97f02f..389acdbe0 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -378,7 +378,7 @@ void LLFloaterAvatarPicker::populateFriend() } for(it = collector.mOffline.begin(); it!=collector.mOffline.end(); it++) { - friends_scroller->addStringUUIDItem(it->first, it->second); + friends_scroller->addStringUUIDItem(it->first, it->second); } friends_scroller->sortByColumnIndex(0, TRUE); } diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp index 2c915ce45..14a684bbe 100644 --- a/indra/newview/llfloaterfriends.cpp +++ b/indra/newview/llfloaterfriends.cpp @@ -322,7 +322,7 @@ BOOL LLPanelFriends::postBuild() return true; } -static const S32& friend_name_system() +const S32& friend_name_system() { static const LLCachedControl name_system("FriendNameSystem", 0); return name_system;