diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-08-09 18:31:10 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-08-09 18:31:10 -0700 |
commit | 481abb13812214d7d5f1124f8eb80f1cc1b08c19 (patch) | |
tree | b461c3658a5962485f3ddf3de720d0a1be7aeba2 /indra/newview/llpanelpeople.cpp | |
parent | 63687148068991008a18d9b500740108afcba932 (diff) |
ACME 824: Suggested Friends do not repopulate if you disconnect and reconnect to Facebook API in same viewer session
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rwxr-xr-x | indra/newview/llpanelpeople.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 1786f73a8b..72953ec6d3 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -835,12 +835,16 @@ void LLPanelPeople::updateRecentList() bool LLPanelPeople::onConnectedToFacebook(const LLSD& data) { - if (data.get("enum").asInteger() == LLFacebookConnect::FB_CONNECTED) - { - LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLPanelPeople"); + LLSD::Integer connection_state = data.get("enum").asInteger(); + if (connection_state == LLFacebookConnect::FB_CONNECTED) + { LLFacebookConnect::instance().loadFacebookFriends(); } + else if(connection_state == LLFacebookConnect::FB_NOT_CONNECTED) + { + updateSuggestedFriendList(); + }; return false; } @@ -852,21 +856,16 @@ void LLPanelPeople::updateFacebookList(bool visible) LLEventPumps::instance().obtain("FacebookConnectContent").stopListening("LLPanelPeople"); // just in case it is already listening LLEventPumps::instance().obtain("FacebookConnectContent").listen("LLPanelPeople", boost::bind(&LLPanelPeople::updateSuggestedFriendList, this)); - if (mTryToConnectToFbc) - { - // try to reconnect to facebook! - if (LLFacebookConnect::instance().isConnected()) - { - LLFacebookConnect::instance().loadFacebookFriends(); - } - else - { - LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLPanelPeople"); // just in case it is already listening - LLEventPumps::instance().obtain("FacebookConnectState").listen("LLPanelPeople", boost::bind(&LLPanelPeople::onConnectedToFacebook, this, _1)); - LLFacebookConnect::instance().checkConnectionToFacebook(); - } + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLPanelPeople"); // just in case it is already listening + LLEventPumps::instance().obtain("FacebookConnectState").listen("LLPanelPeople", boost::bind(&LLPanelPeople::onConnectedToFacebook, this, _1)); - // don't try again + if (LLFacebookConnect::instance().isConnected()) + { + LLFacebookConnect::instance().loadFacebookFriends(); + } + else if(mTryToConnectToFbc) + { + LLFacebookConnect::instance().checkConnectionToFacebook(); mTryToConnectToFbc = false; } @@ -874,6 +873,7 @@ void LLPanelPeople::updateFacebookList(bool visible) } else { + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLPanelPeople"); LLEventPumps::instance().obtain("FacebookConnectContent").stopListening("LLPanelPeople"); } } |