1
0
Fork 0
forked from blue/squawk

support of the new managers in account code, new states, new lambdas, even launches now, even receives some bundles

This commit is contained in:
Blue 2022-12-27 01:01:01 +03:00
parent db3bc358a7
commit dfe72ca36c
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
12 changed files with 113 additions and 25 deletions

View file

@ -265,10 +265,13 @@ void Core::Squawk::disconnectAccount(const QString& account)
void Core::Squawk::onAccountConnectionStateChanged(Shared::ConnectionState p_state)
{
Account* acc = static_cast<Account*>(sender());
emit changeAccount(acc->getName(), {
{"state", QVariant::fromValue(p_state)},
{"error", ""}
});
QMap<QString, QVariant> changes = {
{"state", QVariant::fromValue(p_state)}
};
if (acc->getLastError() == Account::Error::none) {
changes.insert("error", "");
}
emit changeAccount(acc->getName(), changes);
#ifdef WITH_KWALLET
if (p_state == Shared::ConnectionState::connected) {