Remove redundant bool casting

pull/1062/head^2
Vincent 5 years ago
parent 9229ee7482
commit 399ffa3c32

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

@ -363,7 +363,7 @@ export class ConversationHeader extends React.Component<Props> {
i18n,
} = this.props;
const isServerDeletable = !!isPublic;
const isServerDeletable = isPublic;
const deleteMessageButtonText = i18n(
isServerDeletable ? 'unsend' : 'delete'
);

Loading…
Cancel
Save