summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlist.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-07-02 00:38:13 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-07-02 00:38:13 +0000
commit39905b927d60e204438705728d2c214cb3f9ef81 (patch)
tree7bb617cc204514b233e081457d905693aa0ae409 /indra/newview/llavatarlist.cpp
parent687cff0eb8dfe663b99e18cfd953e0764d8ab372 (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@873 https://svn.aws.productengine.com/secondlife/pe/stable@888 -> viewer-2.0.0-pe-4
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
-rw-r--r--indra/newview/llavatarlist.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 08f0cf8842..449bcc4f0b 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -117,7 +117,13 @@ void LLAvatarList::addItem(const LLUUID& id, const std::string& name, BOOL is_bo
}
}
-BOOL LLAvatarList::updateList(const std::vector<LLUUID>& all_buddies)
+static bool findInsensitive(std::string haystack, const std::string& needle_upper)
+{
+ LLStringUtil::toUpper(haystack);
+ return haystack.find(needle_upper) != std::string::npos;
+}
+
+BOOL LLAvatarList::update(const std::vector<LLUUID>& all_buddies, const std::string& name_filter)
{
BOOL have_names = TRUE;
@@ -133,6 +139,8 @@ BOOL LLAvatarList::updateList(const std::vector<LLUUID>& all_buddies)
std::string name;
const LLUUID& buddy_id = *buddy_it;
have_names &= gCacheName->getFullName(buddy_id, name);
+ if (name_filter != LLStringUtil::null && !findInsensitive(name, name_filter))
+ continue;
addItem(buddy_id, name, LLAvatarTracker::instance().isBuddyOnline(buddy_id));
}