From f13a8a3cd5ea5af3ccbb9ca1003fbde20303838b Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Sat, 12 Oct 2024 22:49:20 -0600 Subject: [PATCH] equivalent_boosts? -> repeated_boosts? --- app/models/bubble/thread/rollup.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/bubble/thread/rollup.rb b/app/models/bubble/thread/rollup.rb index be4a49bb2..27c760130 100644 --- a/app/models/bubble/thread/rollup.rb +++ b/app/models/bubble/thread/rollup.rb @@ -27,7 +27,7 @@ class Bubble::Thread::Rollup end def collapsed_entries - sorted_entries.chunk_while { |a, b| equivalent_boosts?(a, b) }.map { |chunk| [ chunk.last, chunk.size ] } + sorted_entries.chunk_while { |a, b| repeated_boosts?(a, b) }.map { |chunk| [ chunk.last, chunk.size ] } end def sorted_entries @@ -40,7 +40,7 @@ class Bubble::Thread::Rollup end end - def equivalent_boosts?(a, b) + def repeated_boosts?(a, b) a.action == "boosted" && a.slice(:action, :creator_id) == b.slice(:action, :creator_id) end