Merge branch 'charlesmchen/newNonContactConversationVsBlocking'

pull/1/head
Matthew Chen 8 years ago
commit 45339a9f94

@ -50,42 +50,14 @@ NS_ASSUME_NONNULL_BEGIN
{ {
OWSAssert(phoneNumber.length > 0); OWSAssert(phoneNumber.length > 0);
__weak NewNonContactConversationViewController *weakSelf = self; [self selectRecipient:phoneNumber];
ContactsViewHelper *helper = self.contactsViewHelper;
if ([helper isRecipientIdBlocked:phoneNumber]) {
[BlockListUIUtils showUnblockPhoneNumberActionSheet:phoneNumber
fromViewController:self
blockingManager:helper.blockingManager
contactsManager:helper.contactsManager
completionBlock:^(BOOL isBlocked) {
if (!isBlocked) {
[weakSelf selectRecipient:phoneNumber];
}
}];
} else {
[self selectRecipient:phoneNumber];
}
} }
- (void)signalAccountWasSelected:(SignalAccount *)signalAccount - (void)signalAccountWasSelected:(SignalAccount *)signalAccount
{ {
OWSAssert(signalAccount); OWSAssert(signalAccount);
__weak NewNonContactConversationViewController *weakSelf = self; [self selectRecipient:signalAccount.recipientId];
ContactsViewHelper *helper = self.contactsViewHelper;
if ([helper isRecipientIdBlocked:signalAccount.recipientId]) {
[BlockListUIUtils showUnblockSignalAccountActionSheet:signalAccount
fromViewController:self
blockingManager:helper.blockingManager
contactsManager:helper.contactsManager
completionBlock:^(BOOL isBlocked) {
if (!isBlocked) {
[weakSelf selectRecipient:signalAccount.recipientId];
}
}];
} else {
[self selectRecipient:signalAccount.recipientId];
}
} }
- (void)selectRecipient:(NSString *)recipientId - (void)selectRecipient:(NSString *)recipientId

Loading…
Cancel
Save