mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Remove TopicView#first_post_id. (#14631)
The method was only used for mega topics but it was redundant as the first post can be determined from using the condition where `Post#post_number` equal to one.
This commit is contained in:
committed by
GitHub
parent
b69c2f7311
commit
fb5a062b1f
@@ -631,10 +631,6 @@ class TopicView
|
||||
@is_mega_topic ||= (@topic.posts_count >= MEGA_TOPIC_POSTS_COUNT)
|
||||
end
|
||||
|
||||
def first_post_id
|
||||
@filtered_posts.order(sort_order: :asc).pluck_first(:id)
|
||||
end
|
||||
|
||||
def last_post_id
|
||||
@filtered_posts.order(sort_order: :desc).pluck_first(:id)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user