From: Ernest Date: Mon, 13 Jul 2020 06:18:11 +0000 (+0200) Subject: Add post title to user comments inbox view, comment_view, user_mention_view X-Git-Url: http://these/git/?a=commitdiff_plain;h=e06d9a620c53eb58aed98db7196555fc6adb5916;p=lemmy.git Add post title to user comments inbox view, comment_view, user_mention_view --- diff --git a/server/lemmy_db/src/comment_view.rs b/server/lemmy_db/src/comment_view.rs index afebac30..4af13c2d 100644 --- a/server/lemmy_db/src/comment_view.rs +++ b/server/lemmy_db/src/comment_view.rs @@ -301,6 +301,7 @@ table! { id -> Int4, creator_id -> Int4, post_id -> Int4, + post_name -> Varchar, parent_id -> Nullable, content -> Text, removed -> Bool, @@ -341,6 +342,7 @@ pub struct ReplyView { pub id: i32, pub creator_id: i32, pub post_id: i32, + pub post_name: String, pub parent_id: Option, pub content: String, pub removed: bool, diff --git a/server/lemmy_db/src/user_mention_view.rs b/server/lemmy_db/src/user_mention_view.rs index 8bfbf453..359f166d 100644 --- a/server/lemmy_db/src/user_mention_view.rs +++ b/server/lemmy_db/src/user_mention_view.rs @@ -11,6 +11,7 @@ table! { creator_actor_id -> Text, creator_local -> Bool, post_id -> Int4, + post_name -> Varchar, parent_id -> Nullable, content -> Text, removed -> Bool, @@ -47,6 +48,7 @@ table! { creator_actor_id -> Text, creator_local -> Bool, post_id -> Int4, + post_name -> Varchar, parent_id -> Nullable, content -> Text, removed -> Bool, @@ -86,6 +88,7 @@ pub struct UserMentionView { pub creator_actor_id: String, pub creator_local: bool, pub post_id: i32, + pub post_name: String, pub parent_id: Option, pub content: String, pub removed: bool, diff --git a/ui/src/components/inbox.tsx b/ui/src/components/inbox.tsx index 2bf1fb47..8e148921 100644 --- a/ui/src/components/inbox.tsx +++ b/ui/src/components/inbox.tsx @@ -267,6 +267,7 @@ export class Inbox extends Component { nodes={[{ comment: i }]} noIndent markable + showCommunity showContext enableDownvotes={this.state.enableDownvotes} /> @@ -285,6 +286,7 @@ export class Inbox extends Component { nodes={commentsToFlatNodes(this.state.replies)} noIndent markable + showCommunity showContext enableDownvotes={this.state.enableDownvotes} /> @@ -300,6 +302,7 @@ export class Inbox extends Component { nodes={[{ comment: mention }]} noIndent markable + showCommunity showContext enableDownvotes={this.state.enableDownvotes} />