Merge remote-tracking branch 'upstream/clearnet' into settings-redesign

This commit is contained in:
Audric Ackermann 2022-08-23 11:20:50 +10:00
commit 5ad8c6fa74
2 changed files with 15 additions and 12 deletions

View file

@ -2,7 +2,7 @@
"name": "session-desktop",
"productName": "Session",
"description": "Private messaging from your desktop",
"version": "1.9.1",
"version": "1.9.2",
"license": "GPL-3.0",
"author": {
"name": "Oxen Labs",

View file

@ -30,6 +30,7 @@ type Props = {
dataTestId?: string;
enableReactions: boolean;
};
// tslint:disable: use-simple-attributes
const StyledMessageContentContainer = styled.div<{ direction: 'left' | 'right' }>`
display: flex;
@ -66,18 +67,20 @@ export const MessageContentWithStatuses = (props: Props) => {
const currentSelection = window.getSelection();
const currentSelectionString = currentSelection?.toString() || undefined;
// if multiple word are selected, consider that this double click was actually NOT used to reply to
// but to select
if ((e.target as any).localName !== 'em-emoji-picker') {
if (
!currentSelectionString ||
currentSelectionString.length === 0 ||
!currentSelectionString.includes(' ')
!/\s/.test(currentSelectionString)
) {
// if multiple word are selected, consider that this double click was actually NOT used to reply to
// but to select
void replyToMessage(messageId);
currentSelection?.empty();
e.preventDefault();
return;
}
}
};
const { messageId, ctxMenuID, isDetailView, dataTestId, enableReactions } = props;