Ctrl+Click to select message, fix delete pluralization
This commit is contained in:
parent
519587450c
commit
e819984239
3 changed files with 14 additions and 2 deletions
|
@ -4656,7 +4656,7 @@
|
|||
"description": "conversation > in select mode > composition area actions > delete selected messages > confirmation modal > title"
|
||||
},
|
||||
"icu:SelectModeActions__confirmDelete--description": {
|
||||
"messageformat": "This message will be deleted from this device.",
|
||||
"messageformat": "{count, plural, one {This message} other {These messages}} will be deleted from this device.",
|
||||
"description": "conversation > in select mode > composition area actions > delete selected messages > confirmation modal > message"
|
||||
},
|
||||
"icu:SelectModeActions__confirmDelete--confirm": {
|
||||
|
|
|
@ -98,6 +98,7 @@ import { Emojify } from './Emojify';
|
|||
import { getPaymentEventDescription } from '../../messages/helpers';
|
||||
import { PanelType } from '../../types/Panels';
|
||||
import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser';
|
||||
import { isMacOS } from '../../OS';
|
||||
|
||||
const GUESS_METADATA_WIDTH_TIMESTAMP_SIZE = 16;
|
||||
const GUESS_METADATA_WIDTH_EXPIRE_TIMER_SIZE = 18;
|
||||
|
@ -2605,6 +2606,15 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
};
|
||||
} else {
|
||||
wrapperProps = {
|
||||
// We use `onClickCapture` here and preven default/stop propagation to
|
||||
// prevent other click handlers from firing.
|
||||
onClickCapture: event => {
|
||||
if (isMacOS() ? event.metaKey : event.ctrlKey) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
onToggleSelect(true, false);
|
||||
}
|
||||
},
|
||||
onDoubleClick: event => {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
|
|
@ -115,7 +115,9 @@ export default function SelectModeActions({
|
|||
setConfirmDelete(false);
|
||||
}}
|
||||
>
|
||||
{i18n('icu:SelectModeActions__confirmDelete--description')}
|
||||
{i18n('icu:SelectModeActions__confirmDelete--description', {
|
||||
count: selectedMessageIds.length,
|
||||
})}
|
||||
</ConfirmationDialog>
|
||||
)}
|
||||
</>
|
||||
|
|
Loading…
Add table
Reference in a new issue