Fix marking scheduled out messages as read.

This commit is contained in:
John Preston 2020-03-25 13:08:08 +04:00
parent 4c7f8a4bbb
commit 36d3dcd6d8
2 changed files with 5 additions and 2 deletions

View file

@ -1648,7 +1648,8 @@ std::optional<int> History::countStillUnreadLocal(MsgId readTillId) const {
for (const auto &block : blocks) {
for (const auto &message : block->messages) {
const auto item = message->data();
if (item->out() || !IsServerMsgId(item->id)) {
if (!IsServerMsgId(item->id)
|| (item->out() && !item->isFromScheduled())) {
continue;
} else if (item->id > readTillId) {
break;

View file

@ -770,7 +770,9 @@ bool HistoryItem::showNotification() const {
if (channel && !channel->amIn()) {
return false;
}
return (out() || _history->peer->isSelf()) ? isFromScheduled() : unread();
return (out() || _history->peer->isSelf())
? isFromScheduled()
: unread();
}
void HistoryItem::markClientSideAsRead() {