2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Correctly clear unread reactions.

This commit is contained in:
John Preston
2022-01-31 11:19:21 +03:00
parent 18919a6b4a
commit 07beb3e86b
6 changed files with 28 additions and 36 deletions

View File

@@ -601,14 +601,14 @@ bool MessageReactions::checkIfChanged(
});
}
void MessageReactions::set(
bool MessageReactions::change(
const QVector<MTPReactionCount> &list,
const QVector<MTPMessagePeerReaction> &recent,
bool ignoreChosen) {
auto &owner = _item->history()->owner();
if (owner.reactions().sending(_item)) {
// We'll apply non-stale data from the request response.
return;
return false;
}
auto changed = false;
auto existing = base::flat_set<QString>();
@@ -663,10 +663,7 @@ void MessageReactions::set(
_recent = std::move(parsed);
changed = true;
}
if (changed) {
owner.notifyItemDataChange(_item);
}
return changed;
}
const base::flat_map<QString, int> &MessageReactions::list() const {