mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 16:38:48 +08:00
FIX: In long topics, filtering button was not always showing in card
This commit is contained in:
@ -34,6 +34,11 @@ class UsersController < ApplicationController
|
||||
if params[:stats].to_s == "false"
|
||||
user_serializer.omit_stats = true
|
||||
end
|
||||
topic_id = params[:include_post_count_for].to_i
|
||||
if topic_id != 0
|
||||
user_serializer.topic_post_count = {topic_id => Post.where(topic_id: topic_id, user_id: @user.id).count }
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
@restrict_fields = guardian.restrict_user_fields?(@user)
|
||||
|
Reference in New Issue
Block a user