From a5366ddf7a646f886d2702ce9454bdc1de271c02 Mon Sep 17 00:00:00 2001 From: biosfood Date: Tue, 12 Sep 2023 00:12:57 +0200 Subject: [PATCH] Don't hide the 'show source' button for anonymous users (#2127) --- src/shared/components/post/post-listing.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 6a1a0cf8..6a3de277 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -604,7 +604,8 @@ export class PostListing extends Component { } commentsLine(mobile = false) { - const post = this.postView.post; + const post_view = this.postView; + const post = post_view.post; return (
@@ -637,6 +638,9 @@ export class PostListing extends Component { my_vote={this.postView.my_vote} /> )} + + {this.props.showBody && post_view.post.body && this.viewSourceButton} + {UserService.Instance.myUserInfo && !this.props.viewOnly && this.postActions()} @@ -655,8 +659,6 @@ export class PostListing extends Component { {this.saveButton} {this.crossPostButton} - {this.props.showBody && post_view.post.body && this.viewSourceButton} -