Do not show the option to copy post if there is no text (#2240)

This commit is contained in:
Elias Nahum 2018-10-10 08:43:49 -03:00 committed by GitHub
parent 224e5a9139
commit 9e8bebe942
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,6 +132,7 @@ export default class PostBody extends PureComponent {
isPostEphemeral,
isSystemMessage,
managedConfig,
message,
onCopyText,
onPostDelete,
onPostEdit,
@ -149,7 +150,7 @@ export default class PostBody extends PureComponent {
});
}
if (managedConfig.copyAndPasteProtection !== 'true') {
if (managedConfig.copyAndPasteProtection !== 'true' && message) {
actions.push({
text: formatMessage({id: 'mobile.post_info.copy_post', defaultMessage: 'Copy Post'}),
onPress: onCopyText,