Comment fixes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
ab517bc0cd
commit
6a243133f6
@ -409,6 +409,10 @@ article {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.comment-replies {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.comment-replies-enter-active,
|
.comment-replies-enter-active,
|
||||||
.comment-replies-leave-active,
|
.comment-replies-leave-active,
|
||||||
.comment-replies-move {
|
.comment-replies-move {
|
||||||
|
@ -68,7 +68,9 @@ defmodule Mobilizon.Conversations do
|
|||||||
Comment
|
Comment
|
||||||
|> join(:left, [c], r in Comment, on: r.origin_comment_id == c.id)
|
|> join(:left, [c], r in Comment, on: r.origin_comment_id == c.id)
|
||||||
|> where([c, _], is_nil(c.in_reply_to_comment_id))
|
|> where([c, _], is_nil(c.in_reply_to_comment_id))
|
||||||
|> where([_, r], is_nil(r.deleted_at))
|
# TODO: This was added because we don't want to count deleted comments in total_replies.
|
||||||
|
# However, it also excludes all top-level comments with deleted replies from being selected
|
||||||
|
# |> where([_, r], is_nil(r.deleted_at))
|
||||||
|> group_by([c], c.id)
|
|> group_by([c], c.id)
|
||||||
|> select([c, r], %{c | total_replies: count(r.id)})
|
|> select([c, r], %{c | total_replies: count(r.id)})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user