diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-05-03 16:18:47 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-05-03 16:18:47 -0700 |
commit | cca67a38d89da30d2b36690d91eb00cac04384bd (patch) | |
tree | 441278090c714d42898c1f4ab010eb60e909173c /indra/newview | |
parent | 0408a984d3efb55cdf88c314e333be3b29c291ea (diff) |
ACME-326 Add ‘connect to facebook’ on menu bar with functionality: Now the 'SL residents you may want to friend' folder is populated only with FB+SL users who are not yet friends.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index e1933c041c..f9f4d6d1b6 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1642,14 +1642,18 @@ void LLPanelPeople::showFacebookFriends(const LLSD& friends) { mFacebookFriends->clear(); S32 model_index; + LLAvatarTracker& avatar_tracker = LLAvatarTracker::instance(); for (LLSD::map_const_iterator i = friends.beginMap(); i != friends.endMap(); ++i) { std::string name = i->second["name"].asString(); LLUUID agent_id = i->second.has("agent_id") ? i->second["agent_id"].asUUID() : LLUUID(NULL); + //add to avatar list + mFacebookFriends->addNewItem(agent_id, name, false); + //FB+SL but not SL friend - if(agent_id.notNull()) + if(agent_id.notNull() && !avatar_tracker.isBuddy(agent_id)) { model_index = 0; } @@ -1659,9 +1663,6 @@ void LLPanelPeople::showFacebookFriends(const LLSD& friends) model_index = 1; } - //add to avatar list - mFacebookFriends->addNewItem(agent_id, name, false); - //Add to folder view LLPersonTabModel * session_model = dynamic_cast<LLPersonTabModel *>(mPersonFolderView->mPersonFolderModelMap[mPersonFolderView->mPersonTabIDs[model_index]]); if(session_model) |