Added FB+SL friends list to Friends tab in Facebook floater for ACME-1334
parent
0bd5fffcac
commit
df26597c0d
|
|
@ -388,7 +388,7 @@ std::string LLFacebookConnect::getFacebookConnectURL(const std::string& route, b
|
|||
if (regionp)
|
||||
{
|
||||
//url = "http://pdp15.lindenlab.com/fbc/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO
|
||||
url = regionp->getCapability("FacebookConnect");
|
||||
url = regionp->getCapability("FacebookConnect");
|
||||
url += route;
|
||||
|
||||
if (include_read_from_master && mReadFromMaster)
|
||||
|
|
|
|||
|
|
@ -750,12 +750,16 @@ void LLFacebookCheckinPanel::clearAndClose()
|
|||
///////////////////////////
|
||||
|
||||
LLFacebookFriendsPanel::LLFacebookFriendsPanel() :
|
||||
mSecondLifeFriends(NULL),
|
||||
mSuggestedFriends(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
BOOL LLFacebookFriendsPanel::postBuild()
|
||||
{
|
||||
mSecondLifeFriends = getChild<LLAvatarList>("second_life_friends");
|
||||
mSecondLifeFriends->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
|
||||
|
||||
mSuggestedFriends = getChild<LLAvatarList>("suggested_friends");
|
||||
mSuggestedFriends->setContextMenu(&LLPanelPeopleMenus::gSuggestedFriendsContextMenu);
|
||||
|
||||
|
|
@ -767,6 +771,8 @@ BOOL LLFacebookFriendsPanel::postBuild()
|
|||
bool LLFacebookFriendsPanel::updateSuggestedFriendList()
|
||||
{
|
||||
const LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
|
||||
uuid_vec_t& second_life_friends = mSecondLifeFriends->getIDs();
|
||||
second_life_friends.clear();
|
||||
uuid_vec_t& suggested_friends = mSuggestedFriends->getIDs();
|
||||
suggested_friends.clear();
|
||||
|
||||
|
|
@ -775,19 +781,23 @@ bool LLFacebookFriendsPanel::updateSuggestedFriendList()
|
|||
for (LLSD::array_const_iterator i = friends.beginArray(); i != friends.endArray(); ++i)
|
||||
{
|
||||
LLUUID agent_id = (*i).asUUID();
|
||||
bool second_life_buddy = agent_id.notNull() ? av_tracker.isBuddy(agent_id) : false;
|
||||
|
||||
if(!second_life_buddy)
|
||||
if (agent_id.notNull())
|
||||
{
|
||||
//FB+SL but not SL friend
|
||||
if (agent_id.notNull())
|
||||
bool second_life_buddy = av_tracker.isBuddy(agent_id);
|
||||
if (second_life_buddy)
|
||||
{
|
||||
second_life_friends.push_back(agent_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
//FB+SL but not SL friend
|
||||
suggested_friends.push_back(agent_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Force a refresh when there aren't any filter matches (prevent displaying content that shouldn't display)
|
||||
mSecondLifeFriends->setDirty(true, !mSecondLifeFriends->filterHasMatches());
|
||||
mSuggestedFriends->setDirty(true, !mSuggestedFriends->filterHasMatches());
|
||||
//showFriendsAccordionsIfNeeded();
|
||||
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ private:
|
|||
void updateFacebookList(bool visible);
|
||||
bool onConnectedToFacebook(const LLSD& data);
|
||||
|
||||
LLAvatarList* mSecondLifeFriends;
|
||||
LLAvatarList* mSuggestedFriends;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,11 +15,28 @@
|
|||
name="friends_accordion"
|
||||
right="-2"
|
||||
top_pad="2">
|
||||
<accordion_tab
|
||||
layout="topleft"
|
||||
height="173"
|
||||
name="tab_second_life_friends"
|
||||
title="SL friends">
|
||||
<avatar_list
|
||||
ignore_online_status="true"
|
||||
allow_select="true"
|
||||
follows="all"
|
||||
height="173"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="second_life_friends"
|
||||
show_permissions_granted="true"
|
||||
top="0"
|
||||
width="307" />
|
||||
</accordion_tab>
|
||||
<accordion_tab
|
||||
layout="topleft"
|
||||
height="173"
|
||||
name="tab_suggested_friends"
|
||||
title="People you may want to friend">
|
||||
title="Add these people as SL friends">
|
||||
<avatar_list
|
||||
ignore_online_status="true"
|
||||
allow_select="true"
|
||||
|
|
|
|||
Loading…
Reference in New Issue