Don't show loading bar when re-loading already loaded status. Don't even try to fetch ancestors from DB when in_reply_to_id is nil
This commit is contained in:
parent
9b0941182f
commit
98560b232a
2 changed files with 16 additions and 12 deletions
|
@ -14,7 +14,7 @@ class Api::V1::StatusesController < ApiController
|
|||
end
|
||||
|
||||
def context
|
||||
@context = OpenStruct.new(ancestors: @status.ancestors(current_account), descendants: @status.descendants(current_account))
|
||||
@context = OpenStruct.new(ancestors: @status.in_reply_to_id.nil? ? [] : @status.ancestors(current_account), descendants: @status.descendants(current_account))
|
||||
statuses = [@status] + @context[:ancestors] + @context[:descendants]
|
||||
|
||||
set_maps(statuses)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue