feat/tray_pictogram #70

Open
pavanvo wants to merge 30 commits from pavanvo/squawk:feat/tray_pictogram into settings
2 changed files with 19 additions and 10 deletions
Showing only changes of commit 4c20a314f0 - Show all commits

View File

@ -4,6 +4,7 @@
### Bug fixes
- now when you remove an account it actually gets removed
- segfault on unitialized Availability in some rare occesions
- fixed crash when you open a dialog with someone that has only error messages in archive
### Improvements
- there is a way to disable an account and it wouldn't connect when you change availability

View File

@ -124,6 +124,7 @@ void Core::RosterItem::nextRequest()
if (requestedCount != -1) {
bool last = false;
if (archiveState == beginning || archiveState == complete) {
try {
QString firstId = archive->oldestId();
if (responseCache.size() == 0) {
if (requestedBefore == firstId) {
@ -134,6 +135,9 @@ void Core::RosterItem::nextRequest()
last = true;
}
}
} catch (const Archive::Empty& e) {
last = true;
}
} else if (archiveState == empty && responseCache.size() == 0) {
last = true;
}
@ -171,8 +175,12 @@ void Core::RosterItem::performRequest(int count, const QString& before)
requestCache.emplace_back(requestedCount, before);
requestedCount = -1;
}
try {
Shared::Message msg = archive->newest();
emit needHistory("", getId(msg), msg.getTime());
} catch (const Archive::Empty& e) { //this can happen when the only message in archive is not server stored (error, for example)
emit needHistory(before, "");
}
}
break;
case end: