File tree Expand file tree Collapse file tree
MessageDisplayKit/Classes/Views/MessageContentViews Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -280,7 +280,9 @@ - (void)longPressGestureRecognizerHandle:(UILongPressGestureRecognizer *)longPre
280280 SEL action = nil ;
281281 switch (i) {
282282 case 0 : {
283- action = @selector (copyed: );
283+ if ([self .messageBubbleView.message messageMediaType ] == XHBubbleMessageMediaTypeText) {
284+ action = @selector (copyed: );
285+ }
284286 break ;
285287 }
286288 case 1 : {
@@ -298,9 +300,11 @@ - (void)longPressGestureRecognizerHandle:(UILongPressGestureRecognizer *)longPre
298300 default :
299301 break ;
300302 }
301- UIMenuItem *item = [[UIMenuItem alloc ] initWithTitle: title action: action];
302- if (item) {
303- [menuItems addObject: item];
303+ if (action) {
304+ UIMenuItem *item = [[UIMenuItem alloc ] initWithTitle: title action: action];
305+ if (item) {
306+ [menuItems addObject: item];
307+ }
304308 }
305309 }
306310
You can’t perform that action at this time.
0 commit comments