Skip to content

Commit 806f362

Browse files
Gargronhiyuki2578
authored andcommitted
Change reblogs counter to be updated when boosted privately (mastodon#10964)
1 parent 000da19 commit 806f362

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/models/status.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,15 +502,15 @@ def increment_counter_caches
502502
return if direct_visibility?
503503

504504
account&.increment_count!(:statuses_count)
505-
reblog&.increment_count!(:reblogs_count) if reblog? && (public_visibility? || unlisted_visibility?)
505+
reblog&.increment_count!(:reblogs_count) if reblog?
506506
thread&.increment_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?)
507507
end
508508

509509
def decrement_counter_caches
510510
return if direct_visibility? || marked_for_mass_destruction?
511511

512512
account&.decrement_count!(:statuses_count)
513-
reblog&.decrement_count!(:reblogs_count) if reblog? && (public_visibility? || unlisted_visibility?)
513+
reblog&.decrement_count!(:reblogs_count) if reblog?
514514
thread&.decrement_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?)
515515
end
516516

0 commit comments

Comments
 (0)