Add feature flag for contact sharing.

pull/1/head
Matthew Chen 7 years ago
parent f4ee688401
commit 459101c20e

@ -3615,17 +3615,20 @@ typedef enum : NSUInteger {
[gifAction setValue:gifImage forKey:@"image"];
[actionSheetController addAction:gifAction];
UIAlertAction *chooseContactAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"ATTACHMENT_MENU_CONTACT_BUTTON", @"attachment menu option to send contact")
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *_Nonnull action) {
[self chooseContactForSending];
}];
// TODO - proper image
UIImage *chooseContactImage = [UIImage imageNamed:@"actionsheet_camera_black"];
OWSAssert(takeMediaImage);
[chooseContactAction setValue:chooseContactImage forKey:@"image"];
[actionSheetController addAction:chooseContactAction];
if (kIsSendingContactSharesEnabled) {
UIAlertAction *chooseContactAction =
[UIAlertAction actionWithTitle:NSLocalizedString(@"ATTACHMENT_MENU_CONTACT_BUTTON",
@"attachment menu option to send contact")
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *_Nonnull action) {
[self chooseContactForSending];
}];
// TODO - proper image
UIImage *chooseContactImage = [UIImage imageNamed:@"actionsheet_camera_black"];
OWSAssert(takeMediaImage);
[chooseContactAction setValue:chooseContactImage forKey:@"image"];
[actionSheetController addAction:chooseContactAction];
}
[self dismissKeyBoard];
[self presentViewController:actionSheetController animated:true completion:nil];

Loading…
Cancel
Save