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

@ -1337,7 +1337,7 @@
const isPublic = this.model.isPublic();
// 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
const isServerDeletable = !!isPublic;
@ -1390,9 +1390,11 @@
// If removable from server, we "Unsend" - otherwise "Delete"
const pluralSuffix = multiple ? 's' : '';
const title = i18n(isPublic
? `unsendMessage${pluralSuffix}`
: `deleteMessage${pluralSuffix}`);
const title = i18n(
isPublic
? `unsendMessage${pluralSuffix}`
: `deleteMessage${pluralSuffix}`
);
const okText = i18n(isServerDeletable ? 'unsend' : 'delete');

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

Loading…
Cancel
Save