hide copy option for closed group

pull/1306/head
Audric Ackermann 5 years ago
parent 9d4dff611f
commit 13b28e565d
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -54,8 +54,8 @@ function showDeleteMessages(isPublic: boolean): boolean {
return !isPublic; return !isPublic;
} }
function showCopyId(isPublic: boolean, isRss: boolean | undefined): boolean { function showCopyId(isPublic: boolean, isRss: boolean, isGroup: boolean): boolean {
return !isPublic && !isRss; return !isGroup && !isRss;
} }
function showDeleteContact( function showDeleteContact(
@ -201,14 +201,14 @@ export function getAddModeratorsMenuItem(
return null; return null;
} }
export function getCopyIdMenuItem( export function getCopyMenuItem(
isPublic: boolean | undefined, isPublic: boolean | undefined,
isRss: boolean | undefined, isRss: boolean | undefined,
isGroup: boolean | undefined, isGroup: boolean | undefined,
action: any, action: any,
i18n: LocalizerType i18n: LocalizerType
): JSX.Element | null { ): JSX.Element | null {
if (showCopyId(Boolean(isPublic), Boolean(isRss))) { if (showCopyId(Boolean(isPublic), Boolean(isRss), Boolean(isGroup))) {
const copyIdLabel = i18n('editMenuCopy'); const copyIdLabel = i18n('editMenuCopy');
return <MenuItem onClick={action}>{copyIdLabel}</MenuItem>; return <MenuItem onClick={action}>{copyIdLabel}</MenuItem>;
} }

Loading…
Cancel
Save