2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Respect global group read position in replies.

This commit is contained in:
John Preston
2020-09-18 14:52:44 +03:00
parent f53f934001
commit ab429212e5
7 changed files with 43 additions and 8 deletions

View File

@@ -1767,6 +1767,14 @@ MsgId History::loadAroundId() const {
return MsgId(0);
}
MsgId History::inboxReadTillId() const {
return _inboxReadBefore.value_or(1) - 1;
}
MsgId History::outboxReadTillId() const {
return _outboxReadBefore.value_or(1) - 1;
}
HistoryItem *History::lastAvailableMessage() const {
return isEmpty() ? nullptr : blocks.back()->messages.back()->data().get();
}