From 13b28e565d751dceeb1caa8f1ff220322e5c18ee Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 14 Aug 2020 11:25:54 +1000 Subject: [PATCH] hide copy option for closed group --- ts/session/utils/Menu.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ts/session/utils/Menu.tsx b/ts/session/utils/Menu.tsx index 18faef424..eb8b54e44 100644 --- a/ts/session/utils/Menu.tsx +++ b/ts/session/utils/Menu.tsx @@ -54,8 +54,8 @@ function showDeleteMessages(isPublic: boolean): boolean { return !isPublic; } -function showCopyId(isPublic: boolean, isRss: boolean | undefined): boolean { - return !isPublic && !isRss; +function showCopyId(isPublic: boolean, isRss: boolean, isGroup: boolean): boolean { + return !isGroup && !isRss; } function showDeleteContact( @@ -201,14 +201,14 @@ export function getAddModeratorsMenuItem( return null; } -export function getCopyIdMenuItem( +export function getCopyMenuItem( isPublic: boolean | undefined, isRss: boolean | undefined, isGroup: boolean | undefined, action: any, i18n: LocalizerType ): JSX.Element | null { - if (showCopyId(Boolean(isPublic), Boolean(isRss))) { + if (showCopyId(Boolean(isPublic), Boolean(isRss), Boolean(isGroup))) { const copyIdLabel = i18n('editMenuCopy'); return {copyIdLabel}; }