mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-27 18:10:58 +00:00
Make displayed count and records consistent
Fixes #35085 Use the same base query to count and fetch records, so the count and the actual records displayed are consistent.
This commit is contained in:
parent
204ff46f7e
commit
94bcf27819
|
|
@ -4,7 +4,7 @@ class Admin::Trends::TagsController < Admin::BaseController
|
|||
def index
|
||||
authorize :tag, :review?
|
||||
|
||||
@pending_tags_count = Tag.pending_review.async_count
|
||||
@pending_tags_count = pending_tags.async_count
|
||||
@tags = filtered_tags.page(params[:page])
|
||||
@form = Trends::TagBatch.new
|
||||
end
|
||||
|
|
@ -26,6 +26,10 @@ class Admin::Trends::TagsController < Admin::BaseController
|
|||
Trends::TagFilter.new(filter_params).results
|
||||
end
|
||||
|
||||
def pending_tags
|
||||
Trends::TagFilter.new(status: :pending_review).results
|
||||
end
|
||||
|
||||
def filter_params
|
||||
params.slice(:page, *Trends::TagFilter::KEYS).permit(:page, *Trends::TagFilter::KEYS)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user