diff options
| author | Leyla Farazha <leyla@lindenlab.com> | 2010-05-28 13:30:55 -0700 |
|---|---|---|
| committer | Leyla Farazha <leyla@lindenlab.com> | 2010-05-28 13:30:55 -0700 |
| commit | 66fe983cb22a7916d46e2df087ce3aade345cdc8 (patch) | |
| tree | f8e121709c3e243b0b749b7a24baa540f1ec1798 /indra/newview/llavatarlist.cpp | |
| parent | 5be933062b0e8dfe6955480b333450a32a444a33 (diff) | |
| parent | b944a4792762bf61b7837a29c8580c9823c9670b (diff) | |
Merge
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
| -rw-r--r-- | indra/newview/llavatarlist.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 57624dec8b..c35e71cc71 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -260,6 +260,8 @@ void LLAvatarList::refresh() } else { + // *NOTE: If you change the UI to show a different string, + // be sure to change the filter code below. addNewItem(buddy_id, av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName, LLAvatarTracker::instance().isBuddyOnline(buddy_id)); @@ -284,10 +286,10 @@ void LLAvatarList::refresh() for (std::vector<LLSD>::const_iterator it=cur_values.begin(); it != cur_values.end(); it++) { - std::string name; const LLUUID& buddy_id = it->asUUID(); - have_names &= (bool)gCacheName->getFullName(buddy_id, name); - if (!findInsensitive(name, mNameFilter)) + LLAvatarName av_name; + have_names &= LLAvatarNameCache::get(buddy_id, &av_name); + if (!findInsensitive(av_name.mDisplayName, mNameFilter)) { removeItemByUUID(buddy_id); modified = true; @@ -339,14 +341,14 @@ bool LLAvatarList::filterHasMatches() for (uuid_vec_t::const_iterator it=values.begin(); it != values.end(); it++) { - std::string name; const LLUUID& buddy_id = *it; - BOOL have_name = gCacheName->getFullName(buddy_id, name); + LLAvatarName av_name; + bool have_name = LLAvatarNameCache::get(buddy_id, &av_name); // If name has not been loaded yet we consider it as a match. // When the name will be loaded the filter will be applied again(in refresh()). - if (have_name && !findInsensitive(name, mNameFilter)) + if (have_name && !findInsensitive(av_name.mDisplayName, mNameFilter)) { continue; } |
