summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersocial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r--indra/newview/llfloatersocial.cpp27
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();