pull/1062/head
Vincent 6 years ago
parent 99200bb725
commit 9229ee7482

@ -1337,7 +1337,7 @@
const isPublic = this.model.isPublic(); const isPublic = this.model.isPublic();
// In future, we may be able to unsend private messages also // In future, we may be able to unsend private messages also
// isServerDeletable also defined in ConversationHeader.tsx for // isServerDeletable also defined in ConversationHeader.tsx for
// future reference // future reference
const isServerDeletable = !!isPublic; const isServerDeletable = !!isPublic;
@ -1390,9 +1390,11 @@
// If removable from server, we "Unsend" - otherwise "Delete" // If removable from server, we "Unsend" - otherwise "Delete"
const pluralSuffix = multiple ? 's' : ''; const pluralSuffix = multiple ? 's' : '';
const title = i18n(isPublic const title = i18n(
? `unsendMessage${pluralSuffix}` isPublic
: `deleteMessage${pluralSuffix}`); ? `unsendMessage${pluralSuffix}`
: `deleteMessage${pluralSuffix}`
);
const okText = i18n(isServerDeletable ? 'unsend' : 'delete'); const okText = i18n(isServerDeletable ? 'unsend' : 'delete');

@ -356,10 +356,17 @@ export class ConversationHeader extends React.Component<Props> {
} }
public renderSelectionOverlay() { public renderSelectionOverlay() {
const { onDeleteSelectedMessages, onCloseOverlay, isPublic, i18n } = this.props; const {
onDeleteSelectedMessages,
onCloseOverlay,
isPublic,
i18n,
} = this.props;
const isServerDeletable = !!isPublic; const isServerDeletable = !!isPublic;
const deleteMessageButtonText = i18n(isServerDeletable ? 'unsend' : 'delete'); const deleteMessageButtonText = i18n(
isServerDeletable ? 'unsend' : 'delete'
);
return ( return (
<div className="message-selection-overlay"> <div className="message-selection-overlay">

Loading…
Cancel
Save