summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/plugins
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2017-09-29 12:22:33 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-09-29 12:57:34 -0700
commit2db4f626ed753ffe7febdcc51a57a10d4e1ce9b6 (patch)
tree473e2dbcd9d36a17e3ca5574d4c86e4b3d403411 /desktop-widgets/plugins
parenta6aeaf897a445952b7e81542df00e0b9a77ce9b6 (diff)
downloadsubsurface-2db4f626ed753ffe7febdcc51a57a10d4e1ce9b6.tar.gz
[Facebook] Only mark as connected if user id is received
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/plugins')
-rw-r--r--desktop-widgets/plugins/facebook/facebookconnectwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
index b2e5f96f2..4562f48a7 100644
--- a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
+++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
@@ -91,7 +91,6 @@ void FacebookManager::tryLogin(const QUrl& loginResponse)
auto fb = SettingsObjectWrapper::instance()->facebook;
fb->setAccessToken(securityToken);
requestUserId();
- emit justLoggedIn(true);
}
void FacebookManager::logout()
@@ -170,8 +169,9 @@ void FacebookManager::userIdReceived()
QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());
QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll());
QJsonObject obj = jsonDoc.object();
- if (obj.keys().contains("id")){
+ if (obj.keys().contains("id")) {
SettingsObjectWrapper::instance()->facebook->setUserId(obj.value("id").toString());
+ emit justLoggedIn(true);
}
reply->deleteLater();
}