mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Max out summary filter at 100 posts.
This commit is contained in:
parent
edea7180f4
commit
3eb020c466
@ -240,7 +240,7 @@ class Post < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.summary
|
def self.summary
|
||||||
where(["(post_number = 1) or (percent_rank <= ?)", SiteSetting.summary_percent_filter.to_f / 100.0])
|
where(["(post_number = 1) or (percent_rank <= ?)", SiteSetting.summary_percent_filter.to_f / 100.0]).limit(100)
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_flagged_posts_count
|
def update_flagged_posts_count
|
||||||
|
@ -404,7 +404,7 @@ class TopicView
|
|||||||
closest_posts = filter_post_ids_by("@(post_number - #{post_number})")
|
closest_posts = filter_post_ids_by("@(post_number - #{post_number})")
|
||||||
return nil if closest_posts.empty?
|
return nil if closest_posts.empty?
|
||||||
|
|
||||||
filtered_post_ids.index(closest_posts.first)
|
filtered_post_ids.index(closest_posts.first) || filtered_post_ids[0]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user