mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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;
|
auto fb = SettingsObjectWrapper::instance()->facebook;
|
||||||
fb->setAccessToken(securityToken);
|
fb->setAccessToken(securityToken);
|
||||||
requestUserId();
|
requestUserId();
|
||||||
emit justLoggedIn(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FacebookManager::logout()
|
void FacebookManager::logout()
|
||||||
|
@ -172,6 +171,7 @@ void FacebookManager::userIdReceived()
|
||||||
QJsonObject obj = jsonDoc.object();
|
QJsonObject obj = jsonDoc.object();
|
||||||
if (obj.keys().contains("id")) {
|
if (obj.keys().contains("id")) {
|
||||||
SettingsObjectWrapper::instance()->facebook->setUserId(obj.value("id").toString());
|
SettingsObjectWrapper::instance()->facebook->setUserId(obj.value("id").toString());
|
||||||
|
emit justLoggedIn(true);
|
||||||
}
|
}
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue