mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix recent userpics display in reactions.
This commit is contained in:
parent
ed3f246510
commit
7c3814cdcd
1 changed files with 5 additions and 6 deletions
|
@ -600,16 +600,15 @@ InlineListData InlineListDataFromMessage(not_null<Message*> message) {
|
|||
if (recent.size() != result.reactions.size()) {
|
||||
return false;
|
||||
}
|
||||
auto b = begin(recent);
|
||||
auto sum = 0;
|
||||
for (const auto &reaction : result.reactions) {
|
||||
sum += reaction.count;
|
||||
if (reaction.id != b->first
|
||||
|| reaction.count != b->second.size()
|
||||
|| sum > kMaxRecentUserpics) {
|
||||
if ((sum += reaction.count) > kMaxRecentUserpics) {
|
||||
return false;
|
||||
}
|
||||
const auto i = recent.find(reaction.id);
|
||||
if (i == end(recent) || reaction.count != i->second.size()) {
|
||||
return false;
|
||||
}
|
||||
++b;
|
||||
}
|
||||
return true;
|
||||
}();
|
||||
|
|
Loading…
Add table
Reference in a new issue