Closed StaticallyTypedRice closed 2 years ago
Hello @Nutomic, Is this issue still actual? If yes I will implement it.
This would be a lemmy ui issue. But also the reason that comments are not hidden like posts, is that comments can have un hidden children.
Actually maybe not a ui issue? But probably just a no fix? Not sure
@dessalines This is about the user profile, so there is no comment tree shown. I think the fix would be essentially to add a parameter like show_deleted_and removed
to CommentQueryBuilder::create(), and set that false in the location below.
https://github.com/LemmyNet/lemmy/blob/main/crates/api_crud/src/user/read.rs#L83
@ba1ash Please go ahead to implement this, and feel free to ask if anything is unclear.
@Nutomic Is there still interest in this?
@kartikynwa Yes of course. If you need any help to implement it, feel free to ask here.
@Nutomic
I am thinking:
In crates/api_common/src/person.rs
, modify GetPersonDetails
and add pub show_deleted_and_removed: Option<bool>
.
In crates/db_views/src/comment_view.rs
, modify CommentQuery
and add show_deleted_and_removed: Option<bool>
. In the list
function, filter query
by deleted=FALSE AND removed=FALSE
if show_deleted_and_removed
is Some(false)
.
In crates/api_crud/src/user/read.rs
, add ..show_deleted_and_removed(data.show_deleted_and_removed)
to the CommentQuery::builder()
call.
Anything else that I am missing?
@kartikynwa That seems correct to me. Let me know in the lemmydev matrix chat if you need any help.
Is your proposal related to a problem?
Having a bunch of "comment deleted" placeholders in a user profile can be distracting, and it also kind of goes against the user's wishes by deleting the content. Also, Lemmy already hides deleted posts so why not deleted comments?
Describe the solution you'd like
I suggest not showing any deleted comments (or rather, deleted comment placeholders) on a user's profile.