tapping contact label shows contact edit view

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent bd343f6971
commit 737a5932c0

@ -136,20 +136,6 @@ NS_ASSUME_NONNULL_BEGIN
}
}
- (void)didTapEditButton
{
if (![self.thread isKindOfClass:[TSContactThread class]]) {
DDLogError(@"%@ unexpected thread: %@ in %s", self.tag, self.thread, __PRETTY_FUNCTION__);
OWSAssert(NO);
return;
}
TSContactThread *contactThread = (TSContactThread *)self.thread;
[self.contactsViewHelper presentContactViewControllerForRecipientId:contactThread.contactIdentifier
fromViewController:self
editImmediately:YES];
}
#pragma mark - ContactEditingDelegate
- (void)didFinishEditingContact
@ -612,7 +598,7 @@ NS_ASSUME_NONNULL_BEGIN
[self showUpdateGroupView:UpdateGroupMode_EditGroupName];
}
} else {
// TODO: Edit 1:1 contact.
[self presentContactViewController];
}
}
}
@ -683,6 +669,25 @@ NS_ASSUME_NONNULL_BEGIN
[self presentViewController:navigationController animated:YES completion:nil];
}
- (void)presentContactViewController
{
if (![self.thread isKindOfClass:[TSContactThread class]]) {
DDLogError(@"%@ unexpected thread: %@ in %s", self.tag, self.thread, __PRETTY_FUNCTION__);
OWSAssert(NO);
return;
}
TSContactThread *contactThread = (TSContactThread *)self.thread;
[self.contactsViewHelper presentContactViewControllerForRecipientId:contactThread.contactIdentifier
fromViewController:self
editImmediately:YES];
}
- (void)didTapEditButton
{
[self presentContactViewController];
}
- (void)didTapLeaveGroup
{
UIAlertController *alertController =

Loading…
Cancel
Save