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.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 71b23e1383..b3ef6464f6 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -33,7 +33,7 @@
#include "llviewerprecompiledheaders.h"
#include "llavatarlist.h"
-#include "llagent.h" // for comparator
+#include "llagentdata.h" // for comparator
// newview
#include "llcallingcard.h" // for LLAvatarTracker
@@ -51,6 +51,12 @@ static const F32 LIT_UPDATE_PERIOD = 5;
// Used to limit time spent for avatar list update per frame.
static const unsigned ADD_LIMIT = 50;
+bool LLAvatarList::contains(const LLUUID& id)
+{
+ const uuid_vector_t& ids = getIDs();
+ return std::find(ids.begin(), ids.end(), id) != ids.end();
+}
+
void LLAvatarList::toggleIcons()
{
// Save the new value for new items to use.
@@ -322,7 +328,6 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
item->setAvatarId(id, mIgnoreOnlineStatus);
item->setOnline(mIgnoreOnlineStatus ? true : is_online);
item->showLastInteractionTime(mShowLastInteractionTime);
- item->setContextMenu(mContextMenu);
item->childSetVisible("info_btn", false);
item->setAvatarIconVisible(mShowIcons);
@@ -425,11 +430,11 @@ bool LLAvatarItemAgentOnTopComparator::doCompare(const LLAvatarListItem* avatar_
{
//keep agent on top, if first is agent,
//then we need to return true to elevate this id, otherwise false.
- if(avatar_item1->getAvatarId() == gAgent.getID())
+ if(avatar_item1->getAvatarId() == gAgentID)
{
return true;
}
- else if (avatar_item2->getAvatarId() == gAgent.getID())
+ else if (avatar_item2->getAvatarId() == gAgentID)
{
return false;
}