File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Models/TSMessageAdapaters Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,8 @@ - (BOOL)canPerformEditingAction:(SEL)action
283283 // Delegate other actions for media items
284284 if (self.isMediaMessage ) {
285285 return [self .mediaItem canPerformEditingAction: action];
286+ } else if (self.messageType == TSInfoMessageAdapter || self.messageType == TSErrorMessageAdapter) {
287+ return NO ;
286288 } else {
287289 // Text message - no media attachment
288290 if (action == @selector (copy: )) {
Original file line number Diff line number Diff line change @@ -861,6 +861,10 @@ - (OWSDisplayedMessageCollectionViewCell *)loadInfoMessageCellForMessage:(OWSInf
861861 [self setBarButtonItemsForDisappearingMessagesConfiguration: configuration];
862862
863863 infoCell.textView .text = [infoMessage text ];
864+
865+ // Disable text selectability. Specifying this in prepareForReuse/awakeFromNib was not sufficient.
866+ infoCell.textView .userInteractionEnabled = NO ;
867+ infoCell.textView .selectable = NO ;
864868 infoCell.messageBubbleContainerView .layer .borderColor = [[UIColor ows_infoMessageBorderColor ] CGColor ];
865869 infoCell.headerImageView .image = [UIImage imageNamed: @" warning_white" ];
866870
@@ -872,6 +876,9 @@ - (OWSDisplayedMessageCollectionViewCell *)loadErrorMessageCellForMessage:(OWSEr
872876{
873877 OWSDisplayedMessageCollectionViewCell *errorCell = [self loadDisplayedMessageCollectionViewCellForIndexPath: indexPath];
874878 errorCell.textView .text = [errorMessage text ];
879+ // Disable text selectability. Specifying this in prepareForReuse/awakeFromNib was not sufficient.
880+ errorCell.textView .userInteractionEnabled = NO ;
881+ errorCell.textView .selectable = NO ;
875882 errorCell.messageBubbleContainerView .layer .borderColor = [[UIColor ows_errorMessageBorderColor ] CGColor ];
876883 errorCell.headerImageView .image = [UIImage imageNamed: @" error_white" ];
877884
Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ - (void)awakeFromNib
5151- (void )prepareForReuse
5252{
5353 [super prepareForReuse ];
54-
5554 self.textView .text = nil ;
5655}
5756
You can’t perform that action at this time.
0 commit comments