Skip to content

Commit

Permalink
Fix scheduled outgoing messages unread state.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Aug 17, 2023
1 parent b23420f commit f8c396e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Telegram/SourceFiles/history/history.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,15 @@ void History::newItemAdded(not_null<HistoryItem*> item) {
Core::App().notifications().schedule(notification);
}
if (item->out()) {
destroyUnreadBar();
if (item->isFromScheduled() && unreadCountRefreshNeeded(item->id)) {
if (unreadCountKnown()) {
setUnreadCount(unreadCount() + 1);
} else if (!isForum()) {
owner().histories().requestDialogEntry(this);
}
} else {
destroyUnreadBar();
}
if (!item->unread(this)) {
outboxRead(item);
}
Expand Down

0 comments on commit f8c396e

Please sign in to comment.