FEATURE: include avatar flair on the avatars listed in a user summary’s “Most…” sections (#12858)

This commit is contained in:
Andrei Prigorshnev
2021-04-27 23:09:32 +04:00
committed by GitHub
parent 42251e2fe6
commit d3c0b6bfe1
2 changed files with 35 additions and 4 deletions

View File

@ -196,9 +196,13 @@ protected
user_ids.map do |user_id|
lookup_hash = lookup[user_id]
UserWithCount.new(
lookup_hash.attributes.merge(count: user_hash[user_id])
) if lookup_hash.present?
if lookup_hash.present?
primary_group = lookup.primary_groups[user_id]
UserWithCount.new(
lookup_hash.attributes.merge(count: user_hash[user_id], primary_group: primary_group)
)
end
end.compact.sort_by { |u| -u[:count] }
end