summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiranV <NiranV.Dean@googlemail.com>2014-08-20 01:38:50 +0200
committerNiranV <NiranV.Dean@googlemail.com>2014-08-20 01:38:50 +0200
commit2b66eeb4a61235fae4c29ecd98890b8b47badafe (patch)
tree316df388d38982e685da25470029a2db31a67981
parentbca5c1ed7956d2b32f1ba1609edd2f00566adc81 (diff)
STORM-2073: Fixed: Do not post our status if we press the "Connect" button otherwise we end up double posting.
-rw-r--r--indra/newview/llfloaterfacebook.cpp7
-rw-r--r--indra/newview/llfloaterfacebook.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp
index 516cf5c15c..d8cc070fd0 100644
--- a/indra/newview/llfloaterfacebook.cpp
+++ b/indra/newview/llfloaterfacebook.cpp
@@ -156,7 +156,8 @@ void LLFacebookStatusPanel::onSend()
{
LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookStatusPanel"); // just in case it is already listening
LLEventPumps::instance().obtain("FacebookConnectState").listen("LLFacebookStatusPanel", boost::bind(&LLFacebookStatusPanel::onFacebookConnectStateChange, this, _1));
-
+
+ pressedConnect = FALSE;
// Connect to Facebook if necessary and then post
if (LLFacebookConnect::instance().isConnected())
{
@@ -186,7 +187,8 @@ bool LLFacebookStatusPanel::onFacebookConnectStateChange(const LLSD& data)
switch (data.get("enum").asInteger())
{
case LLFacebookConnect::FB_CONNECTED:
- sendStatus();
+ if(!pressedConnect)
+ sendStatus();
break;
case LLFacebookConnect::FB_POSTED:
@@ -293,6 +295,7 @@ void LLFacebookStatusPanel::onConnect()
{
LLFacebookConnect::instance().checkConnectionToFacebook(true);
+ pressedConnect = TRUE;
//Clear only the facebook browser cookies so that the facebook login screen appears
LLViewerMedia::getCookieStore()->removeCookiesByDomain(".facebook.com");
}
diff --git a/indra/newview/llfloaterfacebook.h b/indra/newview/llfloaterfacebook.h
index 86e3a148b9..e1526db18d 100644
--- a/indra/newview/llfloaterfacebook.h
+++ b/indra/newview/llfloaterfacebook.h
@@ -62,6 +62,8 @@ private:
void showDisconnectedLayout();
void showConnectedLayout();
+ bool pressedConnect;
+
LLTextBox * mAccountCaptionLabel;
LLTextBox * mAccountNameLabel;
LLUICtrl * mPanelButtons;