Don't select or copy info message text.

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent dc95d328cb
commit 405990a7d5

@ -283,6 +283,8 @@
// Delegate other actions for media items
if (self.isMediaMessage) {
return [self.mediaItem canPerformEditingAction:action];
} else if (self.messageType == TSInfoMessageAdapter || self.messageType == TSErrorMessageAdapter) {
return NO;
} else {
// Text message - no media attachment
if (action == @selector(copy:)) {

@ -861,6 +861,10 @@ typedef enum : NSUInteger {
[self setBarButtonItemsForDisappearingMessagesConfiguration:configuration];
infoCell.textView.text = [infoMessage text];
// Disable text selectability. Specifying this in prepareForReuse/awakeFromNib was not sufficient.
infoCell.textView.userInteractionEnabled = NO;
infoCell.textView.selectable = NO;
infoCell.messageBubbleContainerView.layer.borderColor = [[UIColor ows_infoMessageBorderColor] CGColor];
infoCell.headerImageView.image = [UIImage imageNamed:@"warning_white"];
@ -872,6 +876,9 @@ typedef enum : NSUInteger {
{
OWSDisplayedMessageCollectionViewCell *errorCell = [self loadDisplayedMessageCollectionViewCellForIndexPath:indexPath];
errorCell.textView.text = [errorMessage text];
// Disable text selectability. Specifying this in prepareForReuse/awakeFromNib was not sufficient.
errorCell.textView.userInteractionEnabled = NO;
errorCell.textView.selectable = NO;
errorCell.messageBubbleContainerView.layer.borderColor = [[UIColor ows_errorMessageBorderColor] CGColor];
errorCell.headerImageView.image = [UIImage imageNamed:@"error_white"];

@ -51,7 +51,6 @@ const CGFloat OWSDisplayedMessageCellMinimumHeight = 70.0;
- (void)prepareForReuse
{
[super prepareForReuse];
self.textView.text = nil;
}

Loading…
Cancel
Save