2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fix state assertion in reading requets.

This commit is contained in:
John Preston
2020-02-24 12:57:24 +04:00
parent f1c2d4fe3d
commit 91a6632a1b

View File

@@ -423,7 +423,6 @@ void Histories::sendReadRequest(not_null<History*> history, State &state) {
const auto finished = [=] {
const auto state = lookup(history);
Assert(state != nullptr);
Assert(state->sentReadTill >= tillId);
if (state->sentReadTill == tillId) {
state->sentReadDone = true;
@@ -432,6 +431,8 @@ void Histories::sendReadRequest(not_null<History*> history, State &state) {
} else {
state->sentReadTill = 0;
}
} else {
Assert(!state->sentReadTill || state->sentReadTill > tillId);
}
sendReadRequests();
finish();