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); window.Whisper.events.trigger('inviteFriends', this.model);
}, },
onUpdateGroupName: () => {
window.Whisper.events.trigger('updateGroupName', this.model);
},
onAddModerators: () => { onAddModerators: () => {
window.Whisper.events.trigger('addModerators', this.model); window.Whisper.events.trigger('addModerators', this.model);
}, },

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

Loading…
Cancel
Save