Skip to content

Commit

Permalink
Fix handling of broken threads
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Dec 4, 2018
1 parent 24a8bbb commit d90be8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/statuses_controller.rb
Expand Up @@ -111,6 +111,10 @@ def set_descendants
else
@descendant_threads << create_descendant_thread(starting_depth, statuses)

# The thread is broken, assume it's a reply to the root status
starting_depth = 0

# ... unless we can find its ancestor in one of the already-processed threads
@descendant_threads.reverse_each do |descendant_thread|
statuses = descendant_thread[:statuses]

Expand Down

0 comments on commit d90be8d

Please sign in to comment.