Make sure we request pending dialog entries.

This commit is contained in:
John Preston 2020-02-24 14:40:02 +04:00
parent 91fb9917bc
commit f2ef109940
2 changed files with 6 additions and 0 deletions

View file

@ -238,6 +238,10 @@ void Histories::requestDialogEntry(
if (!ok) {
return;
}
postponeRequestDialogEntries();
}
void Histories::postponeRequestDialogEntries() {
if (_dialogRequestsPending.size() > 1) {
return;
}
@ -655,6 +659,7 @@ void Histories::finishSentRequest(
Assert(ok);
_dialogRequests.erase(i);
state->postponedRequestEntry = false;
postponeRequestDialogEntries();
}
checkEmptyState(history);
}

View file

@ -105,6 +105,7 @@ private:
int id);
[[nodiscard]] bool postponeHistoryRequest(const State &state) const;
[[nodiscard]] bool postponeEntryRequest(const State &state) const;
void postponeRequestDialogEntries();
void sendDialogRequests();
void applyPeerDialogs(const MTPmessages_PeerDialogs &dialogs);