Merge pull request #946 from neuroscr/fixopengroupeditnav

Put "Edit Group Name/Avatar" back in gear menu
pull/950/head
Ryan Tharp 5 years ago committed by GitHub
commit 6d9976c0bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -252,6 +252,10 @@
window.Whisper.events.trigger('inviteFriends', this.model);
},
onUpdateGroupName: () => {
window.Whisper.events.trigger('updateGroupName', this.model);
},
onAddModerators: () => {
window.Whisper.events.trigger('addModerators', this.model);
},

@ -92,6 +92,7 @@ interface Props {
onRemoveModerators: () => void;
onInviteFriends: () => void;
onAvatarClick?: (userPubKey: string) => void;
onUpdateGroupName: () => void;
i18n: LocalizerType;
}
@ -292,6 +293,7 @@ export class ConversationHeader extends React.Component<Props> {
onAddModerators,
onRemoveModerators,
onInviteFriends,
onUpdateGroupName,
} = this.props;
const isPrivateGroup = isGroup && !isPublic && !isRss;
@ -313,6 +315,11 @@ export class ConversationHeader extends React.Component<Props> {
{i18n('removeModerators')}
</MenuItem>
) : null}
{amMod ? (
<MenuItem onClick={onUpdateGroupName}>
{i18n('editGroupNameOrPicture')}
</MenuItem>
) : null}
{isPrivateGroup ? (
<MenuItem onClick={onLeaveGroup}>{i18n('leaveGroup')}</MenuItem>
) : null}

Loading…
Cancel
Save