mucs initial, just display; archive fixes

This commit is contained in:
Blue 2019-07-11 11:51:52 +03:00
parent 30c59fbb91
commit eda96e138d
19 changed files with 626 additions and 43 deletions

View file

@ -266,6 +266,7 @@ void Core::Contact::flushMessagesToArchive(bool finished, const QString& firstId
hisoryCache.clear();
}
bool wasEmpty = false;
switch (archiveState) {
case beginning:
if (finished) {
@ -288,9 +289,10 @@ void Core::Contact::flushMessagesToArchive(bool finished, const QString& firstId
}
break;
case empty:
wasEmpty = true;
archiveState = end;
case end:
if (finished) {
if (finished && (added > 0 || !wasEmpty)) {
archiveState = complete;
archive->setFromTheBeginning(true);
}