FIX: Exclude reply count on posts due to required Comment nesting (#27892)

"Replies" in non-crawler view makes a request when clicked to get all replies, however this does not make sense in the crawler view where we load everything per post number.

So the solution here is to exclude the reply number so we can avoid having to nest all replies in a post.
This commit is contained in:
Natalie Tay 2024-07-15 09:40:47 +08:00 committed by GitHub
parent 06131bd4fd
commit 75236b30d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -108,11 +108,6 @@
<span class='post-likes'><%= post.like_count > 0 ? t('post.has_likes', count: post.like_count) : '' %></span>
</div>
<div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="http://schema.org/CommentAction"/>
<meta itemprop="userInteractionCount" content="<%= post.reply_count %>" />
</div>
<% if @topic_view.link_counts[post.id] && @topic_view.link_counts[post.id].filter { |l| l[:reflection] }.length > 0 %>
<div class='crawler-linkback-list' itemscope itemtype='http://schema.org/ItemList'>
<% @topic_view.link_counts[post.id].each_with_index do |link, i| %>