fix: only close panel when we confirm delete

rtl text support in panelbutton and panelradiobutton
pull/3017/head
William Grant 1 year ago
parent f2ec5d2145
commit 3c5f0bf018

@ -17,8 +17,7 @@ export const StyledText = styled.span<{ color?: string }>`
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
/* TODO needs RTL support */
text-align: left;
text-align: start;
${props => props.color && `color: ${props.color};`}
`;
@ -113,8 +112,7 @@ const StyledSubtitle = styled.p<{ color?: string }>`
line-height: 1.1;
margin-top: 0;
margin-bottom: 0;
/* TODO needs RTL support */
text-align: left;
text-align: start;
${props => props.color && `color: ${props.color};`}
`;

@ -6,7 +6,7 @@ import { PanelButton, PanelButtonProps, PanelButtonText, StyledContent } from '.
const StyledPanelButton = styled(PanelButton)`
padding-top: var(--margins-lg);
padding-bottom: var(--margins-lg);
text-align: left;
text-align: start;
`;
const StyledCheckContainer = styled.div`

@ -233,8 +233,6 @@ export const OverlayMessageInfo = () => {
dataTestId="delete-from-details"
onClick={() => {
void deleteMessagesById([messageId], convoId);
dispatch(closeRightPanel());
dispatch(resetRightOverlayMode());
}}
/>
)}

@ -12,8 +12,9 @@ import { UnsendMessage } from '../../session/messages/outgoing/controlMessage/Un
import { ed25519Str } from '../../session/onions/onionPath';
import { PubKey } from '../../session/types';
import { ToastUtils, UserUtils } from '../../session/utils';
import { resetSelectedMessageIds } from '../../state/ducks/conversations';
import { closeRightPanel, resetSelectedMessageIds } from '../../state/ducks/conversations';
import { updateConfirmModal } from '../../state/ducks/modalDialog';
import { resetRightOverlayMode } from '../../state/ducks/section';
/**
* Deletes messages for everyone in a 1-1 or everyone in a closed group conversation.
@ -393,6 +394,8 @@ export async function deleteMessagesById(messageIds: Array<string>, conversation
deleteForEveryone: args === 'deleteForEveryone', // chosenOption from radioOptions
});
window.inboxStore?.dispatch(updateConfirmModal(null));
window.inboxStore?.dispatch(closeRightPanel());
window.inboxStore?.dispatch(resetRightOverlayMode());
},
closeAfterInput: false,
})

Loading…
Cancel
Save