Skip to content

Commit

Permalink
Don't hide the 'show source' button for anonymous users (#2127)
Browse files Browse the repository at this point in the history
  • Loading branch information
biosfood authored Sep 11, 2023
1 parent d98009c commit a5366dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/shared/components/post/post-listing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
}

commentsLine(mobile = false) {
const post = this.postView.post;
const post_view = this.postView;
const post = post_view.post;

return (
<div className="d-flex align-items-center justify-content-start flex-wrap text-muted">
Expand Down Expand Up @@ -637,6 +638,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
my_vote={this.postView.my_vote}
/>
)}

{this.props.showBody && post_view.post.body && this.viewSourceButton}

{UserService.Instance.myUserInfo &&
!this.props.viewOnly &&
this.postActions()}
Expand All @@ -655,8 +659,6 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
{this.saveButton}
{this.crossPostButton}

{this.props.showBody && post_view.post.body && this.viewSourceButton}

<div className="dropdown">
<button
className="btn btn-sm btn-link btn-animate text-muted py-0 dropdown-toggle"
Expand Down

0 comments on commit a5366dd

Please sign in to comment.