mirror of
https://github.com/discourse/discourse-rewind.git
synced 2025-07-07 14:22:12 +00:00
Fix reaction ordering
This commit is contained in:
parent
5fa624a0e7
commit
b6b36f9e4a
@ -84,7 +84,7 @@ module DiscourseRewind
|
|||||||
end
|
end
|
||||||
|
|
||||||
def sort_and_limit(reactions)
|
def sort_and_limit(reactions)
|
||||||
reactions.sort_by { |_, v| v }.first(5).to_h
|
reactions.sort_by { |_, v| -v }.first(5).reverse.to_h
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user