From e8dfaa458a1093092be34ddf4cce9a0fbf13d15f Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Mon, 19 Jun 2023 15:56:55 -0400 Subject: [PATCH] fix: Always show advanced post buttons dropdown --- src/shared/components/post/post-listing.tsx | 91 +++++++++------------ 1 file changed, 39 insertions(+), 52 deletions(-) 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}
  • + )} + +
    ); } -- 2.44.1