mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
fix, so really long topics are correct, tested perf on a 4k post topic and seems fine
This commit is contained in:
parent
a8085f15c4
commit
4aa7ba620e
1 changed files with 3 additions and 1 deletions
|
@ -31,6 +31,8 @@ class TopicView
|
|||
@user = user
|
||||
@initial_load = true
|
||||
|
||||
@all_posts = @posts
|
||||
|
||||
filter_posts(options)
|
||||
|
||||
@draft_key = @topic.draft_key
|
||||
|
@ -229,7 +231,7 @@ class TopicView
|
|||
# the end of the stream (for mods), nor is it correct for filtered
|
||||
# streams
|
||||
def highest_post_number
|
||||
@highest_post_number ||= @posts.maximum(:post_number)
|
||||
@highest_post_number ||= @all_posts.maximum(:post_number)
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
Loading…
Reference in a new issue