mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
[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>
This commit is contained in:
parent
a6aeaf897a
commit
2db4f626ed
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue