mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Fix recent userpics display in reactions.
This commit is contained in:
@@ -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;
|
||||||
}();
|
}();
|
||||||
|
Reference in New Issue
Block a user