From ea0881f87e4712810b0c1c7a6e510ba27b118577 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 13 Jul 2020 10:39:15 -0400 Subject: [PATCH] Using community-link instead. --- server/lemmy_db/src/schema.rs | 2 +- ui/src/components/comment-node.tsx | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/server/lemmy_db/src/schema.rs b/server/lemmy_db/src/schema.rs index 49dd4e69..9608fb7d 100644 --- a/server/lemmy_db/src/schema.rs +++ b/server/lemmy_db/src/schema.rs @@ -38,7 +38,6 @@ table! { id -> Int4, creator_id -> Nullable, post_id -> Nullable, - post_name -> Nullable, parent_id -> Nullable, content -> Nullable, removed -> Nullable, @@ -48,6 +47,7 @@ table! { deleted -> Nullable, ap_id -> Nullable, local -> Nullable, + post_name -> Nullable, community_id -> Nullable, community_actor_id -> Nullable, community_local -> Nullable, diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index cca235ab..a6b9b7ba 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -32,6 +32,7 @@ import { MomentTime } from './moment-time'; import { CommentForm } from './comment-form'; import { CommentNodes } from './comment-nodes'; import { UserListing } from './user-listing'; +import { CommunityLink } from './community-link'; import { i18n } from '../i18next'; interface CommentNodeState { @@ -186,8 +187,17 @@ export class CommentNode extends Component { {this.props.showCommunity && ( <> {i18n.t('to')} - - {node.comment.community_name} + + • + + {node.comment.post_name} )} @@ -222,15 +232,6 @@ export class CommentNode extends Component { - {this.props.showCommunity && !this.state.collapsed && ( - <> -
- - {node.comment.post_name} - -
- - )} {/* end of user row */} {this.state.showEdit && (