From: Jay Sitter Date: Mon, 19 Jun 2023 19:56:55 +0000 (-0400) Subject: fix: Always show advanced post buttons dropdown X-Git-Url: http://these/git/%7Bthis.captchaPngSrc%28%29%7D?a=commitdiff_plain;h=e8dfaa458a1093092be34ddf4cce9a0fbf13d15f;p=lemmy-ui.git fix: Always show advanced post buttons dropdown --- diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 48d2dc6..5ee0761 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -642,17 +642,6 @@ export class PostListing extends Component { ); } - get hasAdvancedButtons() { - return ( - this.myPost || - (this.showBody && this.postView.post.body) || - amMod(this.props.moderators) || - amAdmin() || - this.canMod_ || - this.canAdmin_ - ); - } - showPreviewButton() { const post_view = this.postView; const body = post_view.post.body; @@ -694,50 +683,48 @@ export class PostListing extends Component { {this.showBody && post_view.post.body && this.viewSourceButton} - {this.hasAdvancedButtons && ( -
- +
+ -
    - {!this.myPost ? ( - <> -
  • {this.reportButton}
  • -
  • {this.blockButton}
  • - - ) : ( - <> -
  • {this.editButton}
  • -
  • {this.deleteButton}
  • - - )} +
      + {!this.myPost ? ( + <> +
    • {this.reportButton}
    • +
    • {this.blockButton}
    • + + ) : ( + <> +
    • {this.editButton}
    • +
    • {this.deleteButton}
    • + + )} - {/* Any mod can do these, not limited to hierarchy*/} - {(amMod(this.props.moderators) || amAdmin()) && ( - <> -
    • -
      -
    • -
    • {this.lockButton}
    • - {this.featureButtons} - - )} + {/* Any mod can do these, not limited to hierarchy*/} + {(amMod(this.props.moderators) || amAdmin()) && ( + <> +
    • +
      +
    • +
    • {this.lockButton}
    • + {this.featureButtons} + + )} - {(this.canMod_ || this.canAdmin_) && ( -
    • {this.modRemoveButton}
    • - )} -
    -
- )} + {(this.canMod_ || this.canAdmin_) && ( +
  • {this.modRemoveButton}
  • + )} + +
    ); }