|
|
@ -542,18 +542,21 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
|
|
|
|
- (NSArray<UIMenuItem *> *)textMenuControllerItems
|
|
|
|
- (NSArray<UIMenuItem *> *)textMenuControllerItems
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return @[
|
|
|
|
return @[
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_COPY_ACTION",
|
|
|
|
|
|
|
|
@"Short name for edit menu item to copy contents of media message.")
|
|
|
|
|
|
|
|
action:self.copyTextActionSelector],
|
|
|
|
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_MESSAGE_METADATA_ACTION",
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_MESSAGE_METADATA_ACTION",
|
|
|
|
@"Short name for edit menu item to show message metadata.")
|
|
|
|
@"Short name for edit menu item to show message metadata.")
|
|
|
|
action:self.metadataActionSelector],
|
|
|
|
action:self.metadataActionSelector],
|
|
|
|
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_COPY_ACTION",
|
|
|
|
|
|
|
|
@"Short name for edit menu item to copy contents of media message.")
|
|
|
|
|
|
|
|
action:self.copyTextActionSelector],
|
|
|
|
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"REPLY_ITEM_ACTION",
|
|
|
|
|
|
|
|
@"Short name for edit menu item to reply to a message.")
|
|
|
|
|
|
|
|
action:self.replyActionSelector],
|
|
|
|
// FIXME: when deleting a caption, users will be surprised that it also deletes the attachment.
|
|
|
|
// FIXME: when deleting a caption, users will be surprised that it also deletes the attachment.
|
|
|
|
// We either need to implement a way to remove the caption separate from the attachment
|
|
|
|
// We either need to implement a way to remove the caption separate from the attachment
|
|
|
|
// or make a design change which clarifies that the whole message is getting deleted.
|
|
|
|
// or make a design change which clarifies that the whole message is getting deleted.
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_DELETE_ACTION",
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_DELETE_ACTION",
|
|
|
|
@"Short name for edit menu item to delete contents of media message.")
|
|
|
|
@"Short name for edit menu item to delete contents of media message.")
|
|
|
|
action:self.deleteActionSelector]
|
|
|
|
action:self.deleteActionSelector]
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- (NSArray<UIMenuItem *> *)mediaMenuControllerItems
|
|
|
|
- (NSArray<UIMenuItem *> *)mediaMenuControllerItems
|
|
|
@ -565,6 +568,9 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_COPY_ACTION",
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_COPY_ACTION",
|
|
|
|
@"Short name for edit menu item to copy contents of media message.")
|
|
|
|
@"Short name for edit menu item to copy contents of media message.")
|
|
|
|
action:self.copyMediaActionSelector],
|
|
|
|
action:self.copyMediaActionSelector],
|
|
|
|
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"REPLY_ITEM_ACTION",
|
|
|
|
|
|
|
|
@"Short name for edit menu item to reply to a message.")
|
|
|
|
|
|
|
|
action:self.replyActionSelector],
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_DELETE_ACTION",
|
|
|
|
[[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"EDIT_ITEM_DELETE_ACTION",
|
|
|
|
@"Short name for edit menu item to delete contents of media message.")
|
|
|
|
@"Short name for edit menu item to delete contents of media message.")
|
|
|
|
action:self.deleteActionSelector],
|
|
|
|
action:self.deleteActionSelector],
|
|
|
@ -604,6 +610,11 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
|
|
|
|
return NSSelectorFromString(@"deleteAction:");
|
|
|
|
return NSSelectorFromString(@"deleteAction:");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (SEL)replyActionSelector
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return NSSelectorFromString(@"replyAction:");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (SEL)metadataActionSelector
|
|
|
|
- (SEL)metadataActionSelector
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return NSSelectorFromString(@"metadataAction:");
|
|
|
|
return NSSelectorFromString(@"metadataAction:");
|
|
|
@ -626,6 +637,8 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
|
|
|
|
return YES;
|
|
|
|
return YES;
|
|
|
|
} else if (action == self.metadataActionSelector) {
|
|
|
|
} else if (action == self.metadataActionSelector) {
|
|
|
|
return YES;
|
|
|
|
return YES;
|
|
|
|
|
|
|
|
} else if (action == self.replyActionSelector) {
|
|
|
|
|
|
|
|
return YES;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return NO;
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|