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

Fix scheduled outgoing messages unread state.

Fixes #17079.
This commit is contained in:
John Preston
2023-08-17 15:36:27 +02:00
parent b23420f775
commit f8c396e2cf

View File

@@ -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);
}