minor bugfix, start account editing feature

This commit is contained in:
Blue 2019-05-23 23:19:53 +03:00
parent 3c3e28b688
commit 16f96c4f2b
10 changed files with 102 additions and 23 deletions

View file

@ -259,17 +259,21 @@ void Core::Contact::flushMessagesToArchive(bool finished, const QString& firstId
}
switch (archiveState) {
break;
case beginning:
if (finished) {
archiveState = complete;
archive->addElements(appendCache);
appendCache.clear();
nextRequest();
} else {
emit needHistory("", lastId);
}
break;
case chunk:
if (finished) {
archiveState = end;
archive->addElements(appendCache);
appendCache.clear();
nextRequest();
} else {
emit needHistory("", lastId);

View file

@ -150,6 +150,19 @@ void Core::Squawk::onAccountConnectionStateChanged(int state)
{
Account* acc = static_cast<Account*>(sender());
emit accountConnectionStateChanged(acc->getName(), state);
if (state == Shared::disconnected) {
bool equals = true;
for (Accounts::const_iterator itr = accounts.begin(), end = accounts.end(); itr != end; itr++) {
if ((*itr)->getState() != Shared::disconnected) {
equals = false;
}
}
if (equals) {
state = Shared::offline;
emit stateChanged(state);
}
}
}
void Core::Squawk::onAccountAddContact(const QString& jid, const QString& group, const QMap<QString, QVariant>& data)