summaryrefslogtreecommitdiffstats
path: root/framework/src/accounts/accountfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/accounts/accountfactory.cpp')
-rw-r--r--framework/src/accounts/accountfactory.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/framework/src/accounts/accountfactory.cpp b/framework/src/accounts/accountfactory.cpp
index 9dbb402b..c7f3855b 100644
--- a/framework/src/accounts/accountfactory.cpp
+++ b/framework/src/accounts/accountfactory.cpp
@@ -43,11 +43,13 @@ QString AccountFactory::name() const
43void AccountFactory::setAccountId(const QString &accountId) 43void AccountFactory::setAccountId(const QString &accountId)
44{ 44{
45 mAccountId = accountId; 45 mAccountId = accountId;
46 Sink::Store::fetchOne<Sink::ApplicationDomain::SinkAccount>(Sink::Query().filter(accountId.toUtf8())) 46 if (!accountId.isEmpty()) {
47 .then([this](const Sink::ApplicationDomain::SinkAccount &account) { 47 Sink::Store::fetchOne<Sink::ApplicationDomain::SinkAccount>(Sink::Query().filter(accountId.toUtf8()))
48 mAccountType = account.getProperty("type").toByteArray(); 48 .then([this](const Sink::ApplicationDomain::SinkAccount &account) {
49 loadPackage(); 49 mAccountType = account.getProperty("type").toByteArray();
50 }).exec(); 50 loadPackage();
51 }).exec();
52 }
51} 53}
52 54
53void AccountFactory::setAccountType(const QString &type) 55void AccountFactory::setAccountType(const QString &type)