2
0
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:
John Preston
2019-08-30 17:06:21 +03:00
parent d95e54cb1a
commit 3715fa4b1e
13 changed files with 60 additions and 46 deletions

View File

@@ -317,7 +317,7 @@ void Manager::doClearAllFast() {
base::take(_hideAll);
}
void Manager::doClearFromHistory(History *history) {
void Manager::doClearFromHistory(not_null<History*> history) {
for (auto i = _queuedNotifications.begin(); i != _queuedNotifications.cend();) {
if (i->history == history) {
i = _queuedNotifications.erase(i);
@@ -333,8 +333,8 @@ void Manager::doClearFromHistory(History *history) {
showNextFromQueue();
}
void Manager::doClearFromItem(HistoryItem *item) {
_queuedNotifications.erase(std::remove_if(_queuedNotifications.begin(), _queuedNotifications.end(), [item](auto &queued) {
void Manager::doClearFromItem(not_null<HistoryItem*> item) {
_queuedNotifications.erase(std::remove_if(_queuedNotifications.begin(), _queuedNotifications.end(), [&](auto &queued) {
return (queued.item == item);
}), _queuedNotifications.cend());