show Delete conversation menu when we got removed from the group too

pull/1495/head
Audric Ackermann 4 years ago
parent 874e3f863b
commit 846f396545
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -126,6 +126,7 @@ export const ConversationHeaderMenu = (props: PropsConversationHeaderMenu) => {
isGroup,
isPublic,
left,
isKickedFromGroup,
onDeleteContact,
window.i18n
)}

@ -93,6 +93,7 @@ export const ConversationListItemContextMenu = (
type === 'group',
isPublic,
left,
isKickedFromGroup,
onDeleteContact,
window.i18n
)}

@ -40,10 +40,11 @@ function showDeleteContact(
isMe: boolean,
isGroup: boolean,
isPublic: boolean,
isGroupLeft: boolean
isGroupLeft: boolean,
isKickedFromGroup: boolean
): boolean {
// you need to have left a closed group first to be able to delete it completely.
return (!isMe && !isGroup) || (isGroup && isGroupLeft);
return (!isMe && !isGroup) || (isGroup && (isGroupLeft || isKickedFromGroup));
}
function showAddModerators(
@ -100,6 +101,7 @@ export function getDeleteContactMenuItem(
isGroup: boolean | undefined,
isPublic: boolean | undefined,
isLeft: boolean | undefined,
isKickedFromGroup: boolean | undefined,
action: any,
i18n: LocalizerType
): JSX.Element | null {
@ -108,7 +110,8 @@ export function getDeleteContactMenuItem(
Boolean(isMe),
Boolean(isGroup),
Boolean(isPublic),
Boolean(isLeft)
Boolean(isLeft),
Boolean(isKickedFromGroup)
)
) {
if (isPublic) {

Loading…
Cancel
Save