diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-07-31 19:04:45 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-07-31 19:04:45 -0700 |
commit | a2b1e06c3def4a8a97a41f3379c336864ede21f8 (patch) | |
tree | 878f1ce1d9c2f90812b250a643cf893cf4282850 /indra/newview/llfloatersocial.cpp | |
parent | d0764f57a5b9591b452b6718d53a8169499e1856 (diff) |
ACME-778: Adjusted the facebook code so that isConnected() does not depend on state changes. Instead it returns true if the user successfully connected and false if the user successfully disconnected.
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 8ca5043a35..0041ee9d7e 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -688,20 +688,17 @@ void LLSocialAccountPanel::onVisibilityChange(const LLSD& new_visibility) bool LLSocialAccountPanel::onFacebookConnectStateChange(const LLSD& data) { - - switch (data.get("enum").asInteger()) + if(LLFacebookConnect::instance().isConnected()) { - case LLFacebookConnect::FB_CONNECTED: - case LLFacebookConnect::FB_POSTING: - case LLFacebookConnect::FB_POSTED: - case LLFacebookConnect::FB_POST_FAILED: + //In process of disconnecting so leave the layout as is + if(data.get("enum").asInteger() != LLFacebookConnect::FB_DISCONNECTING) + { showConnectedLayout(); - break; - case LLFacebookConnect::FB_NOT_CONNECTED: - case LLFacebookConnect::FB_CONNECTION_IN_PROGRESS: - case LLFacebookConnect::FB_CONNECTION_FAILED: - showDisconnectedLayout(); - break; + } + } + else + { + showDisconnectedLayout(); } return false; @@ -882,6 +879,12 @@ void LLFloaterSocial::draw() mStatusLoadingText->setValue(status_text); mStatusLoadingIndicator->setVisible(true); break; + case LLFacebookConnect::FB_DISCONNECT_FAILED: + // Error disconnecting from the service + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialFacebookErrorDisconnecting"); + mStatusErrorText->setValue(status_text); + break; } } LLFloater::draw(); |