mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fix channel reactions list editing.
This commit is contained in:
@@ -214,20 +214,21 @@ PossibleItemReactionsRef LookupPossibleReactions(
|
||||
result.tags = true;
|
||||
} else if (limited) {
|
||||
result.recent.reserve((allowed.paidEnabled ? 1 : 0) + all.size());
|
||||
if (allowed.paidEnabled) {
|
||||
result.recent.push_back(reactions->lookupPaid());
|
||||
}
|
||||
add([&](const Reaction &reaction) {
|
||||
return ranges::contains(all, reaction.id, &MessageReaction::id);
|
||||
});
|
||||
for (const auto &reaction : all) {
|
||||
const auto id = reaction.id;
|
||||
if (!added.contains(id)) {
|
||||
if (added.emplace(id).second) {
|
||||
if (const auto temp = reactions->lookupTemporary(id)) {
|
||||
result.recent.push_back(temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (allowed.paidEnabled
|
||||
&& !added.contains(Data::ReactionId::Paid())) {
|
||||
result.recent.push_back(reactions->lookupPaid());
|
||||
}
|
||||
} else {
|
||||
result.recent.reserve((allowed.paidEnabled ? 1 : 0)
|
||||
+ ((allowed.type == AllowedReactionsType::Some)
|
||||
|
Reference in New Issue
Block a user