Skip to content

Commit 5ba5d3f

Browse files
committed
Remove "Share" from edit menu
Showing the share UI conflicts with the conversation views inputAccessory toolbar. Specifically: - the long press menu acquires first responder - tapping share presents the activity view - at this point, the input toolbar is hidden - launching a share extension hides the activity view, presents the share extension (could be the Signal share extension or another app's share extension) - the conversation view (which is rendered behind the share extension) regains first responder, causing the input toolbar to appear above the share extension One fix would be to re-implement an interface similar UIMenuController, which does not require mucking with the responder chain, but that's going to be more involved. // FREEBIE
1 parent 9428b5d commit 5ba5d3f

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Signal/src/ViewControllers/ConversationView/ConversationViewController.m

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,18 @@ - (void)createContents
549549
[self.loadMoreHeader autoSetDimension:ALDimensionHeight toSize:kLoadMoreHeaderHeight];
550550
}
551551

552+
- (BOOL)becomeFirstResponder
553+
{
554+
DDLogDebug(@"%@ in %s", self.logTag, __PRETTY_FUNCTION__);
555+
return [super becomeFirstResponder];
556+
}
557+
558+
- (BOOL)resignFirstResponder
559+
{
560+
DDLogDebug(@"%@ in %s", self.logTag, __PRETTY_FUNCTION__);
561+
return [super resignFirstResponder];
562+
}
563+
552564
- (BOOL)canBecomeFirstResponder
553565
{
554566
return YES;

Signal/src/ViewControllers/ConversationView/ConversationViewItem.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,6 @@ - (CGSize)mediaSize
465465
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_COPY_ACTION",
466466
@"Short name for edit menu item to copy contents of media message.")
467467
action:self.copyTextActionSelector],
468-
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_SHARE_ACTION",
469-
@"Short name for edit menu item to share contents of media message.")
470-
action:self.shareTextActionSelector],
471468
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_MESSAGE_METADATA_ACTION",
472469
@"Short name for edit menu item to show message metadata.")
473470
action:self.metadataActionSelector],
@@ -482,9 +479,6 @@ - (CGSize)mediaSize
482479
- (NSArray<UIMenuItem *> *)mediaMenuControllerItems
483480
{
484481
return @[
485-
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_SHARE_ACTION",
486-
@"Short name for edit menu item to share contents of media message.")
487-
action:self.shareMediaActionSelector],
488482
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_MESSAGE_METADATA_ACTION",
489483
@"Short name for edit menu item to show message metadata.")
490484
action:self.metadataActionSelector],

0 commit comments

Comments
 (0)