summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-06-13 16:57:04 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2013-06-13 16:57:04 -0700
commitf5fb235aac7bb437416d5c665ff43ed5685a6755 (patch)
tree7f35d6f677decb14f663f6ddf91cc143db164ac2
parent933debfc10d09d1d25fd196597904fc9753b4cb0 (diff)
ACME-537: Prevented error code for showing up when disconnected from FB and opening the 'Friends' tab of the people panel.
-rw-r--r--indra/newview/llfacebookconnect.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index b0b773d508..3de2351d78 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -187,7 +187,10 @@ class LLFacebookConnectedResponder : public LLHTTPClient::Responder
LOG_CLASS(LLFacebookConnectedResponder);
public:
- LLFacebookConnectedResponder(bool show_login_if_not_connected) : mShowLoginIfNotConnected(show_login_if_not_connected) {}
+ LLFacebookConnectedResponder(bool show_login_if_not_connected, bool show_error_if_not_connected)
+ : mShowLoginIfNotConnected(show_login_if_not_connected),
+ mShowErrorIfNotConnected(show_error_if_not_connected)
+ {}
virtual void completed(U32 status, const std::string& reason, const LLSD& content)
{
@@ -208,7 +211,7 @@ public:
{
LLFacebookConnect::instance().connectToFacebook();
}
- else
+ else if(mShowErrorIfNotConnected)
{
prompt_user_for_error(status, reason, content.get("error_code"), content.get("error_description"));
}
@@ -217,6 +220,7 @@ public:
private:
bool mShowLoginIfNotConnected;
+ bool mShowErrorIfNotConnected;
};
///////////////////////////////////////////////////////////////////////////////
@@ -292,7 +296,7 @@ void LLFacebookConnect::tryToReconnectToFacebook()
{
const bool follow_redirects=false;
const F32 timeout=HTTP_REQUEST_EXPIRY_SECS;
- LLHTTPClient::get(getFacebookConnectURL("/connection"), new LLFacebookConnectedResponder(false),
+ LLHTTPClient::get(getFacebookConnectURL("/connection"), new LLFacebookConnectedResponder(false, false),
LLSD(), timeout, follow_redirects);
}
}
@@ -301,7 +305,7 @@ void LLFacebookConnect::getConnectionToFacebook()
{
const bool follow_redirects=false;
const F32 timeout=HTTP_REQUEST_EXPIRY_SECS;
- LLHTTPClient::get(getFacebookConnectURL("/connection"), new LLFacebookConnectedResponder(true),
+ LLHTTPClient::get(getFacebookConnectURL("/connection"), new LLFacebookConnectedResponder(true, true),
LLSD(), timeout, follow_redirects);
}