forked from blue/squawk
minor bugfix, start account editing feature
This commit is contained in:
parent
3c3e28b688
commit
16f96c4f2b
10 changed files with 102 additions and 23 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue