From 2db4f626ed753ffe7febdcc51a57a10d4e1ce9b6 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 29 Sep 2017 12:22:33 +0200 Subject: [Facebook] Only mark as connected if user id is received Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- desktop-widgets/plugins/facebook/facebookconnectwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop-widgets/plugins/facebook/facebookconnectwidget.cpp') 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(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(); } -- cgit v1.2.3-70-g09d2