From: Dessalines Date: Fri, 3 Feb 2023 02:15:36 +0000 (-0500) Subject: Fix showing crosspost dupes. Fixes #900 (#912) X-Git-Url: http://these/git/%7Bcv.comment.ap_id%7D?a=commitdiff_plain;h=1dd86fdf91fc30fce7d6dfeed40f61b355b0a48c;p=lemmy-ui.git Fix showing crosspost dupes. Fixes #900 (#912) --- diff --git a/src/shared/components/post/post.tsx b/src/shared/components/post/post.tsx index 8a51f1c..72a5428 100644 --- a/src/shared/components/post/post.tsx +++ b/src/shared/components/post/post.tsx @@ -754,7 +754,7 @@ export class Post extends Component { } else if (op == UserOperation.Search) { let data = wsJsonToRes(msg); let xPosts = data.posts.filter( - p => p.post.id != Number(this.props.match.params.id) + p => p.post.ap_id != this.state.postRes?.post_view.post.ap_id ); this.setState({ crossPosts: xPosts.length > 0 ? xPosts : undefined }); } else if (op == UserOperation.LeaveAdmin) {