diff --git a/ts/components/conversation/UpdateGroupDialog.tsx b/ts/components/conversation/UpdateGroupDialog.tsx index 0e0d2710b..722950ea1 100644 --- a/ts/components/conversation/UpdateGroupDialog.tsx +++ b/ts/components/conversation/UpdateGroupDialog.tsx @@ -13,6 +13,7 @@ interface Props { titleText: string; groupName: string; okText: string; + isPublic: boolean; cancelText: string; // friends not in the group friendList: Array; @@ -88,16 +89,25 @@ export class UpdateGroupDialog extends React.Component { public render() { const checkMarkedCount = this.getMemberCount(this.state.friendList); - const titleText = `${this.props.titleText} (Members: ${checkMarkedCount})`; + let titleText = `${this.props.titleText} (Members: ${checkMarkedCount})`; const okText = this.props.okText; const cancelText = this.props.cancelText; - const noFriendsClasses = + let noFriendsClasses = this.state.friendList.length === 0 ? 'no-friends' : classNames('no-friends', 'hidden'); + // alternatively, we can go back to const and use more trinary operators + // but this looks cleaner/more organized to me + if (this.props.isPublic) { + // remove member count from title + titleText = `${this.props.titleText}`; + // hide the no-friend message + noFriendsClasses = classNames('no-friends', 'hidden'); + } + const errorMsg = this.state.errorMessage; const errorMessageClasses = classNames( 'error-message',