1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2025-05-11 02:34:10 +02:00

AccountManager: load the cookies

For issue 
This commit is contained in:
Olivier Goffart 2019-03-01 08:46:33 +01:00 committed by Kevin Ottens
parent 575935ded0
commit 87bd26bf6c
No known key found for this signature in database
GPG Key ID: 074BBBCB8DECC9E2

View File

@ -16,6 +16,7 @@
#include "configfile.h"
#include "sslerrordialog.h"
#include "proxyauthhandler.h"
#include "common/asserts.h"
#include <theme.h>
#include <creds/credentialsfactory.h>
#include <creds/abstractcredentials.h>
@ -85,6 +86,10 @@ bool AccountManager::restore()
if (auto acc = loadAccountHelper(*settings)) {
acc->_id = accountId;
if (auto accState = AccountState::loadFromSettings(acc, *settings)) {
auto jar = qobject_cast<CookieJar*>(acc->_am->cookieJar());
ASSERT(jar);
if (jar)
jar->restore(acc->cookieJarPath());
addAccountState(accState);
}
}