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 // 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;
const warningMessage = (() => { const warningMessage = (() => {
if (isPublic) { if (isPublic) {
@ -1390,11 +1390,9 @@
// 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( const title = i18n(isPublic
isPublic ? `unsendMessage${pluralSuffix}`
? `unsendMessage${pluralSuffix}` : `deleteMessage${pluralSuffix}`);
: `deleteMessage${pluralSuffix}`
);
const okText = i18n(isServerDeletable ? 'unsend' : 'delete'); const okText = i18n(isServerDeletable ? 'unsend' : 'delete');

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

Loading…
Cancel
Save