mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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()) {
|
if (recent.size() != result.reactions.size()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
auto b = begin(recent);
|
|
||||||
auto sum = 0;
|
auto sum = 0;
|
||||||
for (const auto &reaction : result.reactions) {
|
for (const auto &reaction : result.reactions) {
|
||||||
sum += reaction.count;
|
if ((sum += reaction.count) > kMaxRecentUserpics) {
|
||||||
if (reaction.id != b->first
|
return false;
|
||||||
|| reaction.count != b->second.size()
|
}
|
||||||
|| sum > kMaxRecentUserpics) {
|
const auto i = recent.find(reaction.id);
|
||||||
|
if (i == end(recent) || reaction.count != i->second.size()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
++b;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}();
|
}();
|
||||||
|
|
Loading…
Add table
Reference in a new issue