diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-05-14 13:58:41 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-05-14 13:58:41 -0700 |
commit | dd8295ab07fec9899e171a4f2ceb1298329ef7b5 (patch) | |
tree | 9979eaaf59847617d04bc00e0ddc06044b95a566 /indra/newview/llpanelpeople.cpp | |
parent | dbef09a2bb629cf6001a3963f6899bcac53b7774 (diff) |
ACME-324 Populate list with FB only friends: Fixed a bug that was causing FB+SL friends to appear within the 'Invite people you know to Second Life' tab.
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index ba7015faf5..0847878fb4 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -943,27 +943,31 @@ void LLPanelPeople::updateFacebookList() { std::string name = i->second["name"].asString(); LLUUID agent_id = i->second.has("agent_id") ? i->second["agent_id"].asUUID() : LLUUID(NULL); - + bool second_life_buddy = agent_id.notNull() ? avatar_tracker.isBuddy(agent_id) : false; + //add to avatar list mFacebookFriends->addNewItem(agent_id, name, false); - //FB+SL but not SL friend - if (agent_id.notNull() && !avatar_tracker.isBuddy(agent_id)) - { - tab_type = LLPersonTabModel::FB_SL_NON_SL_FRIEND; - } - //FB only friend - else - { - tab_type = LLPersonTabModel::FB_ONLY_FRIEND; - } - - //Add to person tab model - LLPersonTabModel * person_tab_model = dynamic_cast<LLPersonTabModel *>(mPersonFolderView->getPersonTabModelByIndex(tab_type)); - if (person_tab_model) - { - addParticipantToModel(person_tab_model, agent_id, name); - } + if(!second_life_buddy) + { + //FB+SL but not SL friend + if (agent_id.notNull()) + { + tab_type = LLPersonTabModel::FB_SL_NON_SL_FRIEND; + } + //FB only friend + else + { + tab_type = LLPersonTabModel::FB_ONLY_FRIEND; + } + + //Add to person tab model + LLPersonTabModel * person_tab_model = dynamic_cast<LLPersonTabModel *>(mPersonFolderView->getPersonTabModelByIndex(tab_type)); + if (person_tab_model) + { + addParticipantToModel(person_tab_model, agent_id, name); + } + } } } } |