hide mod actions appropriately fix #441 (#447)

Thx!
This commit is contained in:
Luna 2021-10-03 21:48:10 +05:30 committed by GitHub
parent 0b3d7fbde4
commit 5de39ca39d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -1111,7 +1111,8 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
}
handleModRemoveShow(i: CommentNode) {
i.state.showRemoveDialog = true;
i.state.showRemoveDialog = !i.state.showRemoveDialog;
i.state.showBanDialog = false;
i.setState(i.state);
}
@ -1167,14 +1168,16 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
}
handleModBanFromCommunityShow(i: CommentNode) {
i.state.showBanDialog = !i.state.showBanDialog;
i.state.showBanDialog = true;
i.state.banType = BanType.Community;
i.state.showRemoveDialog = false;
i.setState(i.state);
}
handleModBanShow(i: CommentNode) {
i.state.showBanDialog = !i.state.showBanDialog;
i.state.showBanDialog = true;
i.state.banType = BanType.Site;
i.state.showRemoveDialog = false;
i.setState(i.state);
}

View file

@ -1425,7 +1425,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
}
handleModRemoveShow(i: PostListing) {
i.state.showRemoveDialog = true;
i.state.showRemoveDialog = !i.state.showRemoveDialog;
i.state.showBanDialog = false;
i.setState(i.state);
}
@ -1474,12 +1475,14 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
handleModBanFromCommunityShow(i: PostListing) {
i.state.showBanDialog = true;
i.state.banType = BanType.Community;
i.state.showRemoveDialog = false;
i.setState(i.state);
}
handleModBanShow(i: PostListing) {
i.state.showBanDialog = true;
i.state.banType = BanType.Site;
i.state.showRemoveDialog = false;
i.setState(i.state);
}