mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Fix scheduled notifications on inbox read.
This commit is contained in:
@@ -1658,10 +1658,7 @@ void History::inboxRead(MsgId upTo, std::optional<int> stillUnread) {
|
||||
}
|
||||
|
||||
_firstUnreadView = nullptr;
|
||||
if (!peer->isSelf()) {
|
||||
// Only reminders generate notifications in Saved Messages.
|
||||
session().notifications().clearFromHistory(this);
|
||||
}
|
||||
session().notifications().clearIncomingFromHistory(this);
|
||||
}
|
||||
|
||||
void History::inboxRead(not_null<const HistoryItem*> wasRead) {
|
||||
@@ -2175,6 +2172,14 @@ void History::clearNotifications() {
|
||||
_notifications.clear();
|
||||
}
|
||||
|
||||
void History::clearIncomingNotifications() {
|
||||
if (!peer->isSelf()) {
|
||||
_notifications.erase(
|
||||
ranges::remove(_notifications, false, &HistoryItem::out),
|
||||
end(_notifications));
|
||||
}
|
||||
}
|
||||
|
||||
bool History::loadedAtBottom() const {
|
||||
return _loadedAtBottom;
|
||||
}
|
||||
|
Reference in New Issue
Block a user