Skip to content

Commit

Permalink
Change reblogs counter to be updated when boosted privately
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron committed Jun 4, 2019
1 parent a1e96b2 commit 64ca6ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,15 @@ def increment_counter_caches
return if direct_visibility?

account&.increment_count!(:statuses_count)
reblog&.increment_count!(:reblogs_count) if reblog? && (public_visibility? || unlisted_visibility?)
reblog&.increment_count!(:reblogs_count) if reblog?
thread&.increment_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?)
end

def decrement_counter_caches
return if direct_visibility? || marked_for_mass_destruction?

account&.decrement_count!(:statuses_count)
reblog&.decrement_count!(:reblogs_count) if reblog? && (public_visibility? || unlisted_visibility?)
reblog&.decrement_count!(:reblogs_count) if reblog?
thread&.decrement_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?)
end

Expand Down

0 comments on commit 64ca6ca

Please sign in to comment.