[UserStatuses] Include favorites and replacements (#517)

* [UserStatuses]: Expand count fixes

* [PostSets] `for_user` -> `for_creator`

* reword to just "counts"

* NoteVersion.where -> NoteVersion.for_user

* Remove some fields

* Fix own replacement count fixers

* remove extra edit count fixers

* accidentally changed the rejected count fixer
This commit is contained in:
Donovan Daniels 2023-05-16 12:58:49 -05:00 committed by GitHub
parent 6ed072b6f7
commit ee359d290f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -762,7 +762,11 @@ class User < ApplicationRecord
post_count: Post.for_user(id).count,
post_deleted_count: Post.for_user(id).deleted.count,
post_update_count: PostVersion.for_user(id).count,
note_count: NoteVersion.where(updater_id: id).count
favorite_count: Favorite.for_user(id).count,
note_count: NoteVersion.for_user(id).count,
own_post_replaced_count: PostReplacement.for_uploader_on_approve(id).count,
own_post_replaced_penalize_count: PostReplacement.penalized.for_uploader_on_approve(id).count,
post_replacement_rejected_count: PostReplacement.rejected.for_user(id).count,
)
end
end

View File

@ -2,7 +2,7 @@
<div id="a-new">
<h1>Refresh Counts</h1>
<p>If you believe the upload counts on your profile are incorrect, you can request a refresh to recalculate the counts.</p>
<p>If you believe the counts on your profile are incorrect, you can request a refresh to recalculate them.</p>
<%= form_tag(maintenance_user_count_fixes_path) do %>
<%= submit_tag "Continue" %>