DRY up common table cell patterns.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 96fd5e11e5
commit eaacac9d8b

@ -179,25 +179,18 @@ NS_ASSUME_NONNULL_BEGIN
selector:@selector(didToggleEnableCensorshipCircumventionSwitch:)]]; selector:@selector(didToggleEnableCensorshipCircumventionSwitch:)]];
if (OWSSignalService.sharedInstance.isCensorshipCircumventionManuallyActivated) { if (OWSSignalService.sharedInstance.isCensorshipCircumventionManuallyActivated) {
[censorshipSection addItem:[OWSTableItem itemWithCustomCellBlock:^{ OWSCountryMetadata *manualCensorshipCircumventionCountry =
OWSCountryMetadata *manualCensorshipCircumventionCountry = [weakSelf ensureManualCensorshipCircumventionCountry];
[weakSelf ensureManualCensorshipCircumventionCountry]; OWSAssert(manualCensorshipCircumventionCountry);
OWSAssert(manualCensorshipCircumventionCountry); NSString *text = [NSString
stringWithFormat:NSLocalizedString(@"SETTINGS_ADVANCED_CENSORSHIP_CIRCUMVENTION_COUNTRY_FORMAT",
UITableViewCell *cell = [UITableViewCell new]; @"Label for the 'manual censorship circumvention' country. Embeds {{the manual "
cell.textLabel.text = [NSString @"censorship circumvention country}}."),
stringWithFormat:NSLocalizedString(@"SETTINGS_ADVANCED_CENSORSHIP_CIRCUMVENTION_COUNTRY_FORMAT", manualCensorshipCircumventionCountry.localizedCountryName];
@"Label for the 'manual censorship circumvention' country. Embeds {{the manual " [censorshipSection addItem:[OWSTableItem disclosureItemWithText:text
@"censorship circumvention country}}."), actionBlock:^{
manualCensorshipCircumventionCountry.localizedCountryName]; [weakSelf showDomainFrontingCountryView];
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; }]];
cell.textLabel.textColor = [UIColor blackColor];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
actionBlock:^{
[weakSelf showDomainFrontingCountryView];
}]];
} }
[contents addSection:censorshipSection]; [contents addSection:censorshipSection];

@ -68,21 +68,16 @@ NS_ASSUME_NONNULL_BEGIN
addSection.footerTitle = NSLocalizedString( addSection.footerTitle = NSLocalizedString(
@"BLOCK_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user."); @"BLOCK_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user.");
[addSection addItem:[OWSTableItem itemWithCustomCellBlock:^{ [addSection
UITableViewCell *cell = [UITableViewCell new]; addItem:[OWSTableItem
cell.textLabel.text = NSLocalizedString( disclosureItemWithText:NSLocalizedString(@"SETTINGS_BLOCK_LIST_ADD_BUTTON",
@"SETTINGS_BLOCK_LIST_ADD_BUTTON", @"A label for the 'add phone number' button in the block list table."); @"A label for the 'add phone number' button in the block list table.")
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; actionBlock:^{
cell.textLabel.textColor = [UIColor blackColor]; AddToBlockListViewController *vc = [[AddToBlockListViewController alloc] init];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; NSAssert(self.navigationController != nil, @"Navigation controller must not be nil");
return cell; NSAssert(vc != nil, @"Privacy Settings View Controller must not be nil");
} [weakSelf.navigationController pushViewController:vc animated:YES];
actionBlock:^{ }]];
AddToBlockListViewController *vc = [[AddToBlockListViewController alloc] init];
NSAssert(self.navigationController != nil, @"Navigation controller must not be nil");
NSAssert(vc != nil, @"Privacy Settings View Controller must not be nil");
[weakSelf.navigationController pushViewController:vc animated:YES];
}]];
[contents addSection:addSection]; [contents addSection:addSection];
// Blocklist section // Blocklist section

@ -287,38 +287,27 @@ NS_ASSUME_NONNULL_BEGIN
[ContactTableViewCell rowHeight]); [ContactTableViewCell rowHeight]);
// Find Non-Contacts by Phone Number // Find Non-Contacts by Phone Number
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{ [section addItem:[OWSTableItem
UITableViewCell *cell = [UITableViewCell new]; disclosureItemWithText:NSLocalizedString(@"NEW_CONVERSATION_FIND_BY_PHONE_NUMBER",
cell.textLabel.text = NSLocalizedString( @"A label the cell that lets you add a new member to a group.")
@"NEW_CONVERSATION_FIND_BY_PHONE_NUMBER", @"A label the cell that lets you add a new member to a group."); customRowHeight:kActionCellHeight
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; actionBlock:^{
cell.textLabel.textColor = [UIColor blackColor]; NewNonContactConversationViewController *viewController =
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; [NewNonContactConversationViewController new];
return cell; viewController.nonContactConversationDelegate = weakSelf;
} [weakSelf.navigationController pushViewController:viewController animated:YES];
customRowHeight:kActionCellHeight }]];
actionBlock:^{
NewNonContactConversationViewController *viewController =
[NewNonContactConversationViewController new];
viewController.nonContactConversationDelegate = weakSelf;
[weakSelf.navigationController pushViewController:viewController animated:YES];
}]];
if (self.contactsViewHelper.contactsManager.isSystemContactsAuthorized) { if (self.contactsViewHelper.contactsManager.isSystemContactsAuthorized) {
// Invite Contacts // Invite Contacts
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{ [section
UITableViewCell *cell = [UITableViewCell new]; addItem:[OWSTableItem
cell.textLabel.text = NSLocalizedString(@"INVITE_FRIENDS_CONTACT_TABLE_BUTTON", disclosureItemWithText:NSLocalizedString(@"INVITE_FRIENDS_CONTACT_TABLE_BUTTON",
@"Label for the cell that presents the 'invite contacts' workflow."); @"Label for the cell that presents the 'invite contacts' workflow.")
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; customRowHeight:kActionCellHeight
cell.textLabel.textColor = [UIColor blackColor]; actionBlock:^{
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; [weakSelf presentInviteFlow];
return cell; }]];
}
customRowHeight:kActionCellHeight
actionBlock:^{
[weakSelf presentInviteFlow];
}]];
} }
// If the search string looks like a phone number, show either "new conversation..." cells and/or // If the search string looks like a phone number, show either "new conversation..." cells and/or
@ -350,22 +339,15 @@ NS_ASSUME_NONNULL_BEGIN
[weakSelf newConversationWith:phoneNumber]; [weakSelf newConversationWith:phoneNumber];
}]]; }]];
} else { } else {
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{ NSString *text = [NSString stringWithFormat:NSLocalizedString(@"SEND_INVITE_VIA_SMS_BUTTON_FORMAT",
UITableViewCell *cell = [UITableViewCell new]; @"Text for button to send a Signal invite via SMS. %@ is "
cell.textLabel.text = @"placeholder for the receipient's phone number."),
[NSString stringWithFormat:NSLocalizedString(@"SEND_INVITE_VIA_SMS_BUTTON_FORMAT", phoneNumber];
@"Text for button to send a Signal invite via SMS. %@ is " [section addItem:[OWSTableItem disclosureItemWithText:text
@"placeholder for the receipient's phone number."), customRowHeight:kActionCellHeight
phoneNumber]; actionBlock:^{
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; [weakSelf sendTextToPhoneNumber:phoneNumber];
cell.textLabel.textColor = [UIColor blackColor]; }]];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
customRowHeight:kActionCellHeight
actionBlock:^{
[weakSelf sendTextToPhoneNumber:phoneNumber];
}]];
} }
} }
@ -411,22 +393,15 @@ NS_ASSUME_NONNULL_BEGIN
displayName = phoneNumber.toE164; displayName = phoneNumber.toE164;
} }
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{ NSString *text = [NSString stringWithFormat:NSLocalizedString(@"SEND_INVITE_VIA_SMS_BUTTON_FORMAT",
UITableViewCell *cell = [UITableViewCell new]; @"Text for button to send a Signal invite via SMS. %@ is "
cell.textLabel.text = @"placeholder for the receipient's phone number."),
[NSString stringWithFormat:NSLocalizedString(@"SEND_INVITE_VIA_SMS_BUTTON_FORMAT", displayName];
@"Text for button to send a Signal invite via SMS. %@ is " [section addItem:[OWSTableItem disclosureItemWithText:text
@"placeholder for the receipient's phone number."), customRowHeight:kActionCellHeight
displayName]; actionBlock:^{
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; [weakSelf sendTextToPhoneNumber:phoneNumber.toE164];
cell.textLabel.textColor = [UIColor blackColor]; }]];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
customRowHeight:kActionCellHeight
actionBlock:^{
[weakSelf sendTextToPhoneNumber:phoneNumber.toE164];
}]];
} }
} }
@ -435,36 +410,22 @@ NS_ASSUME_NONNULL_BEGIN
if (self.contactsViewHelper.contactsManager.isSystemContactsAuthorized if (self.contactsViewHelper.contactsManager.isSystemContactsAuthorized
&& self.contactsViewHelper.hasUpdatedContactsAtLeastOnce) { && self.contactsViewHelper.hasUpdatedContactsAtLeastOnce) {
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{
UITableViewCell *cell = [UITableViewCell new]; [section
cell.textLabel.text = NSLocalizedString( addItem:[OWSTableItem
@"SETTINGS_BLOCK_LIST_NO_CONTACTS", @"A label that indicates the user has no Signal contacts."); softCenterLabelItemWithText:NSLocalizedString(@"SETTINGS_BLOCK_LIST_NO_CONTACTS",
cell.textLabel.font = [UIFont ows_regularFontWithSize:15.f]; @"A label that indicates the user has no Signal contacts.")
cell.textLabel.textColor = [UIColor colorWithWhite:0.5f alpha:1.f]; customRowHeight:kActionCellHeight]];
cell.textLabel.textAlignment = NSTextAlignmentCenter;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
customRowHeight:kActionCellHeight
actionBlock:nil]];
} }
} }
if (hasSearchText && !hasSearchResults) { if (hasSearchText && !hasSearchResults) {
// No Search Results // No Search Results
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{ [section addItem:[OWSTableItem softCenterLabelItemWithText:
UITableViewCell *cell = [UITableViewCell new]; NSLocalizedString(@"SETTINGS_BLOCK_LIST_NO_SEARCH_RESULTS",
cell.textLabel.text = NSLocalizedString(@"SETTINGS_BLOCK_LIST_NO_SEARCH_RESULTS", @"A label that indicates the user's search has no matching results.")
@"A label that indicates the user's search has no matching results."); customRowHeight:kActionCellHeight]];
cell.textLabel.font = [UIFont ows_regularFontWithSize:15.f];
cell.textLabel.textColor = [UIColor colorWithWhite:0.5f alpha:1.f];
cell.textLabel.textAlignment = NSTextAlignmentCenter;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
customRowHeight:kActionCellHeight
actionBlock:nil]];
} }
[contents addSection:section]; [contents addSection:section];

@ -364,16 +364,10 @@ const NSUInteger kNewGroupViewControllerAvatarWidth = 68;
}]]; }]];
} }
} else { } else {
[signalAccountSection addItem:[OWSTableItem itemWithCustomCellBlock:^{ [signalAccountSection
UITableViewCell *cell = [UITableViewCell new]; addItem:[OWSTableItem
cell.textLabel.text = NSLocalizedString( softCenterLabelItemWithText:NSLocalizedString(@"SETTINGS_BLOCK_LIST_NO_CONTACTS",
@"SETTINGS_BLOCK_LIST_NO_CONTACTS", @"A label that indicates the user has no Signal contacts."); @"A label that indicates the user has no Signal contacts.")]];
cell.textLabel.font = [UIFont ows_regularFontWithSize:15.f];
cell.textLabel.textColor = [UIColor colorWithWhite:0.5f alpha:1.f];
cell.textLabel.textAlignment = NSTextAlignmentCenter;
return cell;
}
actionBlock:nil]];
} }
[contents addSection:signalAccountSection]; [contents addSection:signalAccountSection];
@ -383,22 +377,16 @@ const NSUInteger kNewGroupViewControllerAvatarWidth = 68;
- (OWSTableItem *)createAddNonContactItem - (OWSTableItem *)createAddNonContactItem
{ {
__weak NewGroupViewController *weakSelf = self; __weak NewGroupViewController *weakSelf = self;
return [OWSTableItem itemWithCustomCellBlock:^{ return [OWSTableItem
UITableViewCell *cell = [UITableViewCell new]; disclosureItemWithText:NSLocalizedString(@"NEW_GROUP_ADD_NON_CONTACT",
cell.textLabel.text = NSLocalizedString(@"NEW_GROUP_ADD_NON_CONTACT", @"A label for the cell that lets you add a new non-contact member to a group.")
@"A label for the cell that lets you add a new non-contact member to a group."); customRowHeight:[ContactTableViewCell rowHeight]
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; actionBlock:^{
cell.textLabel.textColor = [UIColor blackColor]; AddToGroupViewController *viewController = [AddToGroupViewController new];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; viewController.addToGroupDelegate = weakSelf;
return cell; viewController.hideContacts = YES;
} [weakSelf.navigationController pushViewController:viewController animated:YES];
customRowHeight:[ContactTableViewCell rowHeight] }];
actionBlock:^{
AddToGroupViewController *viewController = [AddToGroupViewController new];
viewController.addToGroupDelegate = weakSelf;
viewController.hideContacts = YES;
[weakSelf.navigationController pushViewController:viewController animated:YES];
}];
} }
- (void)removeRecipientId:(NSString *)recipientId - (void)removeRecipientId:(NSString *)recipientId

@ -72,6 +72,10 @@ typedef UITableViewCell *_Nonnull (^OWSTableCustomCellBlock)();
+ (OWSTableItem *)actionItemWithText:(NSString *)text actionBlock:(nullable OWSTableActionBlock)actionBlock; + (OWSTableItem *)actionItemWithText:(NSString *)text actionBlock:(nullable OWSTableActionBlock)actionBlock;
+ (OWSTableItem *)softCenterLabelItemWithText:(NSString *)text;
+ (OWSTableItem *)softCenterLabelItemWithText:(NSString *)text customRowHeight:(CGFloat)customRowHeight;
+ (OWSTableItem *)labelItemWithText:(NSString *)text; + (OWSTableItem *)labelItemWithText:(NSString *)text;
+ (OWSTableItem *)labelItemWithText:(NSString *)text accessoryText:(NSString *)accessoryText; + (OWSTableItem *)labelItemWithText:(NSString *)text accessoryText:(NSString *)accessoryText;

@ -127,13 +127,9 @@ const CGFloat kOWSTable_DefaultCellHeight = 45.f;
customRowHeight:(CGFloat)customRowHeight customRowHeight:(CGFloat)customRowHeight
actionBlock:(nullable OWSTableActionBlock)actionBlock actionBlock:(nullable OWSTableActionBlock)actionBlock
{ {
OWSAssert(customCellBlock);
OWSAssert(customRowHeight > 0); OWSAssert(customRowHeight > 0);
OWSTableItem *item = [OWSTableItem new]; OWSTableItem *item = [self itemWithCustomCellBlock:customCellBlock actionBlock:actionBlock];
item.itemType = (actionBlock != nil ? OWSTableItemTypeAction : OWSTableItemTypeDefault);
item.actionBlock = actionBlock;
item.customCellBlock = customCellBlock;
item.customRowHeight = @(customRowHeight); item.customRowHeight = @(customRowHeight);
return item; return item;
} }
@ -173,6 +169,8 @@ const CGFloat kOWSTable_DefaultCellHeight = 45.f;
customRowHeight:(CGFloat)customRowHeight customRowHeight:(CGFloat)customRowHeight
actionBlock:(nullable OWSTableActionBlock)actionBlock actionBlock:(nullable OWSTableActionBlock)actionBlock
{ {
OWSAssert(customRowHeight > 0);
OWSTableItem *item = [self disclosureItemWithText:text actionBlock:actionBlock]; OWSTableItem *item = [self disclosureItemWithText:text actionBlock:actionBlock];
item.customRowHeight = @(customRowHeight); item.customRowHeight = @(customRowHeight);
return item; return item;
@ -196,6 +194,38 @@ const CGFloat kOWSTable_DefaultCellHeight = 45.f;
return item; return item;
} }
+ (OWSTableItem *)softCenterLabelItemWithText:(NSString *)text
{
OWSAssert(text.length > 0);
OWSTableItem *item = [OWSTableItem new];
item.itemType = OWSTableItemTypeAction;
item.customCellBlock = ^{
UITableViewCell *cell = [UITableViewCell new];
cell.textLabel.text = text;
// These cells look quite different.
//
// Smaller font.
cell.textLabel.font = [UIFont ows_regularFontWithSize:15.f];
// Soft color.
cell.textLabel.textColor = [UIColor colorWithWhite:0.5f alpha:1.f];
// Centered.
cell.textLabel.textAlignment = NSTextAlignmentCenter;
cell.userInteractionEnabled = NO;
return cell;
};
return item;
}
+ (OWSTableItem *)softCenterLabelItemWithText:(NSString *)text customRowHeight:(CGFloat)customRowHeight
{
OWSAssert(customRowHeight > 0);
OWSTableItem *item = [self softCenterLabelItemWithText:text];
item.customRowHeight = @(customRowHeight);
return item;
}
+ (OWSTableItem *)labelItemWithText:(NSString *)text + (OWSTableItem *)labelItemWithText:(NSString *)text
{ {
OWSAssert(text.length > 0); OWSAssert(text.length > 0);

@ -522,17 +522,10 @@ NSString *const kSelectRecipientViewControllerCellIdentifier = @"kSelectRecipien
if (signalAccounts.count == 0) { if (signalAccounts.count == 0) {
// No Contacts // No Contacts
[contactsSection addItem:[OWSTableItem itemWithCustomCellBlock:^{ [contactsSection
UITableViewCell *cell = [UITableViewCell new]; addItem:[OWSTableItem softCenterLabelItemWithText:
cell.textLabel.text = NSLocalizedString( NSLocalizedString(@"SETTINGS_BLOCK_LIST_NO_CONTACTS",
@"SETTINGS_BLOCK_LIST_NO_CONTACTS", @"A label that indicates the user has no Signal contacts."); @"A label that indicates the user has no Signal contacts.")]];
cell.textLabel.font = [UIFont ows_regularFontWithSize:15.f];
cell.textLabel.textColor = [UIColor colorWithWhite:0.5f alpha:1.f];
cell.textLabel.textAlignment = NSTextAlignmentCenter;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
actionBlock:nil]];
} else { } else {
// Contacts // Contacts

@ -175,16 +175,10 @@ NS_ASSUME_NONNULL_BEGIN
} }
if (section.itemCount < 1) { if (section.itemCount < 1) {
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{ [section
UITableViewCell *cell = [UITableViewCell new]; addItem:[OWSTableItem
cell.textLabel.text = NSLocalizedString( softCenterLabelItemWithText:NSLocalizedString(@"SETTINGS_BLOCK_LIST_NO_CONTACTS",
@"SETTINGS_BLOCK_LIST_NO_CONTACTS", @"A label that indicates the user has no Signal contacts."); @"A label that indicates the user has no Signal contacts.")]];
cell.textLabel.font = [UIFont ows_regularFontWithSize:15.f];
cell.textLabel.textColor = [UIColor colorWithWhite:0.5f alpha:1.f];
cell.textLabel.textAlignment = NSTextAlignmentCenter;
return cell;
}
actionBlock:nil]];
} }
[contents addSection:section]; [contents addSection:section];

@ -97,6 +97,8 @@
__weak SettingsTableViewController *weakSelf = self; __weak SettingsTableViewController *weakSelf = self;
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{ [section addItem:[OWSTableItem itemWithCustomCellBlock:^{
UITableViewCell *cell = [UITableViewCell new]; UITableViewCell *cell = [UITableViewCell new];
cell.preservesSuperviewLayoutMargins = YES;
cell.contentView.preservesSuperviewLayoutMargins = YES;
UILabel *titleLabel = [UILabel new]; UILabel *titleLabel = [UILabel new];
titleLabel.font = [UIFont ows_mediumFontWithSize:20.f]; titleLabel.font = [UIFont ows_mediumFontWithSize:20.f];
@ -112,7 +114,7 @@
subtitleLabel.textAlignment = NSTextAlignmentCenter; subtitleLabel.textAlignment = NSTextAlignmentCenter;
UIView *stack = [UIView new]; UIView *stack = [UIView new];
[cell addSubview:stack]; [cell.contentView addSubview:stack];
[stack autoCenterInSuperview]; [stack autoCenterInSuperview];
[stack addSubview:titleLabel]; [stack addSubview:titleLabel];
@ -214,8 +216,7 @@
[cell.contentView addSubview:button]; [cell.contentView addSubview:button];
[button autoSetDimension:ALDimensionHeight toSize:50.f]; [button autoSetDimension:ALDimensionHeight toSize:50.f];
[button autoVCenterInSuperview]; [button autoVCenterInSuperview];
[button autoPinLeadingToSuperView]; [button autoPinLeadingAndTrailingToSuperview];
[button autoPinTrailingToSuperView];
[button addTarget:self action:@selector(unregisterUser) forControlEvents:UIControlEventTouchUpInside]; [button addTarget:self action:@selector(unregisterUser) forControlEvents:UIControlEventTouchUpInside];
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell; return cell;

@ -239,21 +239,15 @@ NS_ASSUME_NONNULL_BEGIN
section.headerTitle = NSLocalizedString( section.headerTitle = NSLocalizedString(
@"EDIT_GROUP_MEMBERS_SECTION_TITLE", @"a title for the members section of the 'new/update group' view."); @"EDIT_GROUP_MEMBERS_SECTION_TITLE", @"a title for the members section of the 'new/update group' view.");
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{ [section addItem:[OWSTableItem
UITableViewCell *cell = [UITableViewCell new]; disclosureItemWithText:NSLocalizedString(@"EDIT_GROUP_MEMBERS_ADD_MEMBER",
cell.textLabel.text = NSLocalizedString( @"Label for the cell that lets you add a new member to a group.")
@"EDIT_GROUP_MEMBERS_ADD_MEMBER", @"Label for the cell that lets you add a new member to a group."); customRowHeight:[ContactTableViewCell rowHeight]
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; actionBlock:^{
cell.textLabel.textColor = [UIColor blackColor]; AddToGroupViewController *viewController = [AddToGroupViewController new];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; viewController.addToGroupDelegate = weakSelf;
return cell; [weakSelf.navigationController pushViewController:viewController animated:YES];
} }]];
customRowHeight:[ContactTableViewCell rowHeight]
actionBlock:^{
AddToGroupViewController *viewController = [AddToGroupViewController new];
viewController.addToGroupDelegate = weakSelf;
[weakSelf.navigationController pushViewController:viewController animated:YES];
}]];
NSMutableSet *memberRecipientIds = [self.memberRecipientIds mutableCopy]; NSMutableSet *memberRecipientIds = [self.memberRecipientIds mutableCopy];
[memberRecipientIds removeObject:[contactsViewHelper localNumber]]; [memberRecipientIds removeObject:[contactsViewHelper localNumber]];

Loading…
Cancel
Save