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:
@@ -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 {
|
||||
|
@@ -150,7 +150,7 @@ public:
|
||||
|
||||
void add(const QString &reaction);
|
||||
void remove();
|
||||
void set(
|
||||
bool change(
|
||||
const QVector<MTPReactionCount> &list,
|
||||
const QVector<MTPMessagePeerReaction> &recent,
|
||||
bool ignoreChosen);
|
||||
|
Reference in New Issue
Block a user