Respond to CR.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent f71ec9f7cb
commit 26f69b0063

@ -3074,7 +3074,15 @@ typedef enum : NSUInteger {
- (void)popAllConversationSettingsViews - (void)popAllConversationSettingsViews
{ {
if (self.presentedViewController) {
[self.presentedViewController
dismissViewControllerAnimated:YES
completion:^{
[self.navigationController popToViewController:self animated:YES]; [self.navigationController popToViewController:self animated:YES];
}];
} else {
[self.navigationController popToViewController:self animated:YES];
}
} }
#pragma mark - Class methods #pragma mark - Class methods

@ -10,9 +10,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, weak) id<OWSConversationSettingsViewDelegate> delegate; @property (nonatomic, weak) id<OWSConversationSettingsViewDelegate> delegate;
@property (nonatomic) BOOL shouldEditGroupNameOnAppear;
@property (nonatomic) BOOL shouldEditAvatarOnAppear;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

@ -8,7 +8,6 @@
#import "ContactsViewHelper.h" #import "ContactsViewHelper.h"
#import "Environment.h" #import "Environment.h"
#import "GroupViewHelper.h" #import "GroupViewHelper.h"
#import "OWSAnyTouchGestureRecognizer.h"
#import "OWSContactsManager.h" #import "OWSContactsManager.h"
#import "OWSTableViewController.h" #import "OWSTableViewController.h"
#import "SecurityUtils.h" #import "SecurityUtils.h"
@ -45,6 +44,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic) NSMutableSet<NSString *> *memberRecipientIds; @property (nonatomic) NSMutableSet<NSString *> *memberRecipientIds;
@property (nonatomic) BOOL hasUnsavedChanges; @property (nonatomic) BOOL hasUnsavedChanges;
@property (nonatomic) BOOL hasAppeared;
@end @end
@ -93,13 +93,12 @@ NS_ASSUME_NONNULL_BEGIN
{ {
[super loadView]; [super loadView];
self.title = NSLocalizedString(@"NEW_GROUP_DEFAULT_TITLE", @"The title for the 'new group' view."); self.title = NSLocalizedString(@"NEW_GROUP_DEFAULT_TITLE", @"The navbar title for the 'new group' view.");
self.navigationItem.leftBarButtonItem = self.navigationItem.leftBarButtonItem =
[self createOWSBackButtonWithTarget:self selector:@selector(backButtonPressed:)]; [self createOWSBackButtonWithTarget:self selector:@selector(backButtonPressed:)];
self.navigationItem.rightBarButtonItem = self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
[[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"add-conversation"] initWithTitle:NSLocalizedString(@"NEW_GROUP_CREATE_BUTTON", @"The title for the 'create group' button.")
imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]
style:UIBarButtonItemStylePlain style:UIBarButtonItemStylePlain
target:self target:self
action:@selector(createGroup)]; action:@selector(createGroup)];
@ -152,7 +151,8 @@ NS_ASSUME_NONNULL_BEGIN
_groupNameTextField = groupNameTextField; _groupNameTextField = groupNameTextField;
groupNameTextField.textColor = [UIColor blackColor]; groupNameTextField.textColor = [UIColor blackColor];
groupNameTextField.font = [UIFont ows_dynamicTypeTitle2Font]; groupNameTextField.font = [UIFont ows_dynamicTypeTitle2Font];
groupNameTextField.placeholder = NSLocalizedString(@"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT", @""); groupNameTextField.placeholder
= NSLocalizedString(@"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT", @"Placeholder text for group name field");
groupNameTextField.delegate = self; groupNameTextField.delegate = self;
[groupNameTextField addTarget:self [groupNameTextField addTarget:self
action:@selector(groupNameDidChange:) action:@selector(groupNameDidChange:)
@ -162,8 +162,8 @@ NS_ASSUME_NONNULL_BEGIN
[groupNameTextField autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:avatarView withOffset:16.f]; [groupNameTextField autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:avatarView withOffset:16.f];
[groupNameTextField autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f]; [groupNameTextField autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f];
[avatarView addGestureRecognizer:[[OWSAnyTouchGestureRecognizer alloc] initWithTarget:self [avatarView
action:@selector(avatarTouched:)]]; addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(avatarTouched:)]];
avatarView.userInteractionEnabled = YES; avatarView.userInteractionEnabled = YES;
return firstSectionHeader; return firstSectionHeader;
@ -315,8 +315,8 @@ NS_ASSUME_NONNULL_BEGIN
__weak NewGroupViewController *weakSelf = self; __weak NewGroupViewController *weakSelf = self;
return [OWSTableItem itemWithCustomCellBlock:^{ return [OWSTableItem itemWithCustomCellBlock:^{
UITableViewCell *cell = [UITableViewCell new]; UITableViewCell *cell = [UITableViewCell new];
cell.textLabel.text = NSLocalizedString( cell.textLabel.text = NSLocalizedString(@"NEW_GROUP_ADD_NON_CONTACT",
@"NEW_GROUP_ADD_NON_CONTACT", @"A label 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.");
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f];
cell.textLabel.textColor = [UIColor blackColor]; cell.textLabel.textColor = [UIColor blackColor];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
@ -361,13 +361,10 @@ NS_ASSUME_NONNULL_BEGIN
{ {
[super viewDidAppear:animated]; [super viewDidAppear:animated];
if (self.shouldEditGroupNameOnAppear) { if (!self.hasAppeared) {
[self.groupNameTextField becomeFirstResponder]; [self.groupNameTextField becomeFirstResponder];
} else if (self.shouldEditAvatarOnAppear) { self.hasAppeared = YES;
[self showChangeGroupAvatarUI];
} }
self.shouldEditGroupNameOnAppear = NO;
self.shouldEditAvatarOnAppear = NO;
} }
#pragma mark - Actions #pragma mark - Actions

@ -6,7 +6,6 @@
#import "BlockListUIUtils.h" #import "BlockListUIUtils.h"
#import "Environment.h" #import "Environment.h"
#import "FingerprintViewController.h" #import "FingerprintViewController.h"
#import "OWSAnyTouchGestureRecognizer.h"
#import "OWSAvatarBuilder.h" #import "OWSAvatarBuilder.h"
#import "OWSBlockingManager.h" #import "OWSBlockingManager.h"
#import "OWSContactsManager.h" #import "OWSContactsManager.h"
@ -529,7 +528,7 @@ NS_ASSUME_NONNULL_BEGIN
} }
[firstSectionHeader [firstSectionHeader
addGestureRecognizer:[[OWSAnyTouchGestureRecognizer alloc] initWithTarget:self addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(conversationNameTouched:)]]; action:@selector(conversationNameTouched:)]];
firstSectionHeader.userInteractionEnabled = YES; firstSectionHeader.userInteractionEnabled = YES;

@ -7,7 +7,6 @@
#import "ContactsViewHelper.h" #import "ContactsViewHelper.h"
#import "CountryCodeViewController.h" #import "CountryCodeViewController.h"
#import "Environment.h" #import "Environment.h"
#import "OWSAnyTouchGestureRecognizer.h"
#import "OWSContactsManager.h" #import "OWSContactsManager.h"
#import "OWSTableViewController.h" #import "OWSTableViewController.h"
#import "PhoneNumber.h" #import "PhoneNumber.h"

@ -6,6 +6,7 @@ NS_ASSUME_NONNULL_BEGIN
@class Contact; @class Contact;
@class SignalRecipient; @class SignalRecipient;
@class YapDatabaseReadTransaction;
// This class represents a single valid Signal account. // This class represents a single valid Signal account.
// //
@ -32,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
// For contacts with more than one signal account, // For contacts with more than one signal account,
// this is a label for the account. // this is a label for the account.
@property (nonatomic) NSString *multipleAccountLabel; @property (nonatomic) NSString *multipleAccountLabelText;
- (instancetype)init NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE;
@ -41,11 +42,9 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithRecipientId:(NSString *)recipientId; - (instancetype)initWithRecipientId:(NSString *)recipientId;
// In most cases this should be non-null. This should only // In most cases this should be non-null. This should only
// be non-null in the case where the SignalRecipient was // be null in the case where the SignalRecipient was
// deleted before this property was accessed. // deleted before this property was accessed.
// - (nullable SignalRecipient *)signalRecipientWithTransaction:(YapDatabaseReadTransaction *)transaction;
// NOTE: This may create a database transaction.
- (nullable SignalRecipient *)signalRecipient;
@end @end

@ -10,10 +10,6 @@ NS_ASSUME_NONNULL_BEGIN
@interface SignalAccount () @interface SignalAccount ()
@property (nonatomic, nullable) SignalRecipient *signalRecipient;
// This property may be modified after construction, so it should
// only be modified on the main thread.
@property (nonatomic) NSString *recipientId; @property (nonatomic) NSString *recipientId;
@end @end
@ -27,7 +23,6 @@ NS_ASSUME_NONNULL_BEGIN
if (self = [super init]) { if (self = [super init]) {
OWSAssert(signalRecipient); OWSAssert(signalRecipient);
_signalRecipient = signalRecipient;
_recipientId = signalRecipient.uniqueId; _recipientId = signalRecipient.uniqueId;
} }
return self; return self;
@ -43,18 +38,12 @@ NS_ASSUME_NONNULL_BEGIN
return self; return self;
} }
- (nullable SignalRecipient *)signalRecipient - (nullable SignalRecipient *)signalRecipientWithTransaction:(YapDatabaseReadTransaction *)transaction
{ {
OWSAssert([NSThread isMainThread]); OWSAssert([NSThread isMainThread]);
OWSAssert(transaction);
if (!_signalRecipient) { return [SignalRecipient recipientWithTextSecureIdentifier:self.recipientId withTransaction:transaction];
[[TSStorageManager sharedManager].dbConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) {
_signalRecipient =
[SignalRecipient recipientWithTextSecureIdentifier:self.recipientId withTransaction:transaction];
}];
}
return _signalRecipient;
} }
@end @end

@ -9,7 +9,6 @@
#import "ContactsViewHelper.h" #import "ContactsViewHelper.h"
#import "Environment.h" #import "Environment.h"
#import "GroupViewHelper.h" #import "GroupViewHelper.h"
#import "OWSAnyTouchGestureRecognizer.h"
#import "OWSContactsManager.h" #import "OWSContactsManager.h"
#import "OWSTableViewController.h" #import "OWSTableViewController.h"
#import "SecurityUtils.h" #import "SecurityUtils.h"
@ -103,7 +102,7 @@ NS_ASSUME_NONNULL_BEGIN
[self.memberRecipientIds addObjectsFromArray:self.thread.groupModel.groupMemberIds]; [self.memberRecipientIds addObjectsFromArray:self.thread.groupModel.groupMemberIds];
self.previousMemberRecipientIds = [NSSet setWithArray:self.thread.groupModel.groupMemberIds]; self.previousMemberRecipientIds = [NSSet setWithArray:self.thread.groupModel.groupMemberIds];
self.title = NSLocalizedString(@"EDIT_GROUP_DEFAULT_TITLE", @"The default title for the 'update group' view."); self.title = NSLocalizedString(@"EDIT_GROUP_DEFAULT_TITLE", @"The navbar title for the 'update group' view.");
self.navigationItem.leftBarButtonItem = self.navigationItem.leftBarButtonItem =
[self createOWSBackButtonWithTarget:self selector:@selector(backButtonPressed:)]; [self createOWSBackButtonWithTarget:self selector:@selector(backButtonPressed:)];
@ -132,6 +131,24 @@ NS_ASSUME_NONNULL_BEGIN
[self.navigationController.navigationBar setTranslucent:NO]; [self.navigationController.navigationBar setTranslucent:NO];
} }
- (void)setHasUnsavedChanges:(BOOL)hasUnsavedChanges
{
_hasUnsavedChanges = hasUnsavedChanges;
[self updateNavigationBar];
}
- (void)updateNavigationBar
{
self.navigationItem.rightBarButtonItem = (self.hasUnsavedChanges
? [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"EDIT_GROUP_UPDATE_BUTTON",
@"The title for the 'update group' button.")
style:UIBarButtonItemStylePlain
target:self
action:@selector(updateGroupPressed)]
: nil);
}
- (void)viewDidAppear:(BOOL)animated - (void)viewDidAppear:(BOOL)animated
{ {
[super viewDidAppear:animated]; [super viewDidAppear:animated];
@ -183,7 +200,8 @@ NS_ASSUME_NONNULL_BEGIN
} }
groupNameTextField.textColor = [UIColor blackColor]; groupNameTextField.textColor = [UIColor blackColor];
groupNameTextField.font = [UIFont ows_dynamicTypeTitle2Font]; groupNameTextField.font = [UIFont ows_dynamicTypeTitle2Font];
groupNameTextField.placeholder = NSLocalizedString(@"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT", @""); groupNameTextField.placeholder
= NSLocalizedString(@"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT", @"Placeholder text for group name field");
groupNameTextField.delegate = self; groupNameTextField.delegate = self;
[groupNameTextField addTarget:self [groupNameTextField addTarget:self
action:@selector(groupNameDidChange:) action:@selector(groupNameDidChange:)
@ -193,8 +211,8 @@ NS_ASSUME_NONNULL_BEGIN
[groupNameTextField autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:avatarView withOffset:16.f]; [groupNameTextField autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:avatarView withOffset:16.f];
[groupNameTextField autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f]; [groupNameTextField autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f];
[avatarView addGestureRecognizer:[[OWSAnyTouchGestureRecognizer alloc] initWithTarget:self [avatarView
action:@selector(avatarTouched:)]]; addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(avatarTouched:)]];
avatarView.userInteractionEnabled = YES; avatarView.userInteractionEnabled = YES;
return firstSectionHeader; return firstSectionHeader;
@ -227,7 +245,7 @@ NS_ASSUME_NONNULL_BEGIN
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{ [section addItem:[OWSTableItem itemWithCustomCellBlock:^{
UITableViewCell *cell = [UITableViewCell new]; UITableViewCell *cell = [UITableViewCell new];
cell.textLabel.text = NSLocalizedString( cell.textLabel.text = NSLocalizedString(
@"EDIT_GROUP_MEMBERS_ADD_MEMBER", @"A label 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.");
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f];
cell.textLabel.textColor = [UIColor blackColor]; cell.textLabel.textColor = [UIColor blackColor];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
@ -431,6 +449,14 @@ NS_ASSUME_NONNULL_BEGIN
[self presentViewController:controller animated:YES completion:nil]; [self presentViewController:controller animated:YES completion:nil];
} }
- (void)updateGroupPressed
{
OWSAssert(self.conversationSettingsViewDelegate);
[self updateGroup];
[self.conversationSettingsViewDelegate popAllConversationSettingsViews];
}
- (void)groupNameDidChange:(id)sender - (void)groupNameDidChange:(id)sender
{ {

@ -29,7 +29,7 @@ extern NSString *const OWSContactsManagerSignalAccountsDidChangeNotification;
@property (atomic, readonly) NSDictionary<NSString *, SignalAccount *> *signalAccountMap; @property (atomic, readonly) NSDictionary<NSString *, SignalAccount *> *signalAccountMap;
@property (atomic, readonly) NSArray<SignalAccount *> *signalAccounts; @property (atomic, readonly) NSArray<SignalAccount *> *signalAccounts;
- (nullable SignalAccount *)signalAccountForRecipientId:(nullable NSString *)recipientId; - (nullable SignalAccount *)signalAccountForRecipientId:(NSString *)recipientId;
- (Contact *)getOrBuildContactForPhoneIdentifier:(NSString *)identifier; - (Contact *)getOrBuildContactForPhoneIdentifier:(NSString *)identifier;
@ -42,10 +42,9 @@ extern NSString *const OWSContactsManagerSignalAccountsDidChangeNotification;
- (NSString *)displayNameForPhoneIdentifier:(nullable NSString *)identifier; - (NSString *)displayNameForPhoneIdentifier:(nullable NSString *)identifier;
- (NSString *)displayNameForContact:(Contact *)contact; - (NSString *)displayNameForContact:(Contact *)contact;
- (NSString *_Nonnull)displayNameForSignalAccount:(SignalAccount *)signalAccount; - (NSString *)displayNameForSignalAccount:(SignalAccount *)signalAccount;
- (nullable UIImage *)imageForPhoneIdentifier:(nullable NSString *)identifier; - (nullable UIImage *)imageForPhoneIdentifier:(nullable NSString *)identifier;
- (NSAttributedString *_Nonnull)formattedDisplayNameForSignalAccount:(SignalAccount *)signalAccount - (NSAttributedString *)formattedDisplayNameForSignalAccount:(SignalAccount *)signalAccount font:(UIFont *_Nonnull)font;
font:(UIFont *_Nonnull)font;
- (NSAttributedString *)formattedFullNameForContact:(Contact *)contact font:(UIFont *)font; - (NSAttributedString *)formattedFullNameForContact:(Contact *)contact font:(UIFont *)font;
- (NSAttributedString *)formattedFullNameForRecipientId:(NSString *)recipientId font:(UIFont *)font; - (NSAttributedString *)formattedFullNameForRecipientId:(NSString *)recipientId font:(UIFont *)font;

@ -82,7 +82,6 @@ void onAddressBookChanged(ABAddressBookRef notifyAddressBook, CFDictionaryRef in
- (void)handleAddressBookChanged - (void)handleAddressBookChanged
{ {
[self.avatarCache removeAllObjects];
[self pullLatestAddressBook]; [self pullLatestAddressBook];
} }
@ -193,6 +192,8 @@ void onAddressBookChanged(ABAddressBookRef notifyAddressBook, CFDictionaryRef in
self.allContacts = contacts; self.allContacts = contacts;
self.allContactsMap = [allContactsMap copy]; self.allContactsMap = [allContactsMap copy];
[self.avatarCache removeAllObjects];
[self intersectContacts]; [self intersectContacts];
[self updateSignalAccounts]; [self updateSignalAccounts];
@ -215,7 +216,7 @@ void onAddressBookChanged(ABAddressBookRef notifyAddressBook, CFDictionaryRef in
signalAccount.contact = contact; signalAccount.contact = contact;
if (signalRecipients.count > 1) { if (signalRecipients.count > 1) {
signalAccount.hasMultipleAccountContact = YES; signalAccount.hasMultipleAccountContact = YES;
signalAccount.multipleAccountLabel = signalAccount.multipleAccountLabelText =
[[self class] accountLabelForContact:contact recipientId:signalRecipient.recipientId]; [[self class] accountLabelForContact:contact recipientId:signalRecipient.recipientId];
} }
if (signalAccountMap[signalAccount.recipientId]) { if (signalAccountMap[signalAccount.recipientId]) {
@ -277,7 +278,8 @@ void onAddressBookChanged(ABAddressBookRef notifyAddressBook, CFDictionaryRef in
phoneNumberLabel = NSLocalizedString(@"PHONE_NUMBER_TYPE_PAGER", @"Label for 'Pager' phone numbers."); phoneNumberLabel = NSLocalizedString(@"PHONE_NUMBER_TYPE_PAGER", @"Label for 'Pager' phone numbers.");
break; break;
case OWSPhoneNumberTypeUnknown: case OWSPhoneNumberTypeUnknown:
phoneNumberLabel = NSLocalizedString(@"PHONE_NUMBER_TYPE_UNKNOWN", @"Label for 'Unknown' phone numbers."); phoneNumberLabel = NSLocalizedString(@"PHONE_NUMBER_TYPE_UNKNOWN",
@"Label used when we don't what kind of phone number it is (e.g. mobile/work/home).");
break; break;
} }
@ -562,9 +564,9 @@ void onAddressBookChanged(ABAddressBookRef notifyAddressBook, CFDictionaryRef in
NSString *baseName = (signalAccount.contact ? [self displayNameForContact:signalAccount.contact] NSString *baseName = (signalAccount.contact ? [self displayNameForContact:signalAccount.contact]
: [self displayNameForPhoneIdentifier:signalAccount.recipientId]); : [self displayNameForPhoneIdentifier:signalAccount.recipientId]);
OWSAssert(signalAccount.hasMultipleAccountContact == (signalAccount.multipleAccountLabel != nil)); OWSAssert(signalAccount.hasMultipleAccountContact == (signalAccount.multipleAccountLabelText != nil));
if (signalAccount.multipleAccountLabel) { if (signalAccount.multipleAccountLabelText) {
return [NSString stringWithFormat:@"%@ (%@)", baseName, signalAccount.multipleAccountLabel]; return [NSString stringWithFormat:@"%@ (%@)", baseName, signalAccount.multipleAccountLabelText];
} else { } else {
return baseName; return baseName;
} }
@ -577,15 +579,16 @@ void onAddressBookChanged(ABAddressBookRef notifyAddressBook, CFDictionaryRef in
OWSAssert(font); OWSAssert(font);
NSAttributedString *baseName = [self formattedFullNameForContact:signalAccount.contact font:font]; NSAttributedString *baseName = [self formattedFullNameForContact:signalAccount.contact font:font];
OWSAssert(signalAccount.hasMultipleAccountContact == (signalAccount.multipleAccountLabel != nil)); OWSAssert(signalAccount.hasMultipleAccountContact == (signalAccount.multipleAccountLabelText != nil));
if (signalAccount.multipleAccountLabel) { if (signalAccount.multipleAccountLabelText) {
NSMutableAttributedString *result = [NSMutableAttributedString new]; NSMutableAttributedString *result = [NSMutableAttributedString new];
[result appendAttributedString:baseName]; [result appendAttributedString:baseName];
[result appendAttributedString:[[NSAttributedString alloc] initWithString:@" (" [result appendAttributedString:[[NSAttributedString alloc] initWithString:@" ("
attributes:@{ attributes:@{
NSFontAttributeName : font, NSFontAttributeName : font,
}]]; }]];
[result appendAttributedString:[[NSAttributedString alloc] initWithString:signalAccount.multipleAccountLabel]]; [result
appendAttributedString:[[NSAttributedString alloc] initWithString:signalAccount.multipleAccountLabelText]];
[result appendAttributedString:[[NSAttributedString alloc] initWithString:@")" [result appendAttributedString:[[NSAttributedString alloc] initWithString:@")"
attributes:@{ attributes:@{
NSFontAttributeName : font, NSFontAttributeName : font,
@ -656,7 +659,7 @@ void onAddressBookChanged(ABAddressBookRef notifyAddressBook, CFDictionaryRef in
attributes:normalFontAttributes]; attributes:normalFontAttributes];
} }
- (nullable SignalAccount *)signalAccountForRecipientId:(nullable NSString *)recipientId - (nullable SignalAccount *)signalAccountForRecipientId:(NSString *)recipientId
{ {
OWSAssert(recipientId.length > 0); OWSAssert(recipientId.length > 0);

@ -89,7 +89,7 @@ NS_ASSUME_NONNULL_BEGIN
return; return;
} }
SignalAccount *signalAccount = [contactsManager signalAccountForRecipientId:contactThread.contactIdentifier]; SignalAccount *signalAccount = contactsManager.signalAccountMap[contactThread.contactIdentifier];
if (signalAccount) { if (signalAccount) {
// Only create block offers for non-contacts. // Only create block offers for non-contacts.
return; return;

@ -337,10 +337,10 @@
/* a title for the contacts section of the 'new/update group' view. */ /* a title for the contacts section of the 'new/update group' view. */
"EDIT_GROUP_CONTACTS_SECTION_TITLE" = "Contacts"; "EDIT_GROUP_CONTACTS_SECTION_TITLE" = "Contacts";
/* The default title for the 'update group' view. */ /* The navbar title for the 'update group' view. */
"EDIT_GROUP_DEFAULT_TITLE" = "Edit Group"; "EDIT_GROUP_DEFAULT_TITLE" = "Edit Group";
/* A label the cell that lets you add a new member to a group. */ /* Label for the cell that lets you add a new member to a group. */
"EDIT_GROUP_MEMBERS_ADD_MEMBER" = "Add…"; "EDIT_GROUP_MEMBERS_ADD_MEMBER" = "Add…";
/* a title for the members section of the 'new/update group' view. */ /* a title for the members section of the 'new/update group' view. */
@ -349,14 +349,8 @@
/* An indicator that a user is a new member of the group. */ /* An indicator that a user is a new member of the group. */
"EDIT_GROUP_NEW_MEMBER_LABEL" = "Added"; "EDIT_GROUP_NEW_MEMBER_LABEL" = "Added";
/* A format for the message of the alert confirming whether user wants to remove a user from a group. Embeds {{the user's name or phone number}}. */ /* The title for the 'update group' button. */
"EDIT_GROUP_REMOVE_MEMBER_ALERT_MESSAGE_FORMAT" = "Would you like to remove %@ from this group?"; "EDIT_GROUP_UPDATE_BUTTON" = "Update";
/* A title of the alert confirming whether user wants to remove a user from a group. */
"EDIT_GROUP_REMOVE_MEMBER_ALERT_TITLE" = "Remove Group Member?";
/* A title of the button that confirms user wants to remove a user from a group. */
"EDIT_GROUP_REMOVE_MEMBER_BUTTON" = "Remove";
/* The alert message if user tries to exit update group view without saving changes. */ /* The alert message if user tries to exit update group view without saving changes. */
"EDIT_GROUP_VIEW_UNSAVED_CHANGES_MESSAGE" = "You've changed this group. Would you like to save these changes?"; "EDIT_GROUP_VIEW_UNSAVED_CHANGES_MESSAGE" = "You've changed this group. Would you like to save these changes?";
@ -753,19 +747,22 @@
/* Text for button to start a new conversation with a non-contact */ /* Text for button to start a new conversation with a non-contact */
"NEW_CONVERSATION_FOR_NON_CONTACT_FORMAT" = "New conversation with %@"; "NEW_CONVERSATION_FOR_NON_CONTACT_FORMAT" = "New conversation with %@";
/* A label 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. */
"NEW_GROUP_ADD_NON_CONTACT" = "Add by phone number…"; "NEW_GROUP_ADD_NON_CONTACT" = "Add by phone number…";
/* Action Sheet title prompting the user for a group avatar */ /* Action Sheet title prompting the user for a group avatar */
"NEW_GROUP_ADD_PHOTO_ACTION" = "Set Group Photo"; "NEW_GROUP_ADD_PHOTO_ACTION" = "Set Group Photo";
/* The title for the 'new group' view. */ /* The title for the 'create group' button. */
"NEW_GROUP_CREATE_BUTTON" = "Create";
/* The navbar title for the 'new group' view. */
"NEW_GROUP_DEFAULT_TITLE" = "New Group"; "NEW_GROUP_DEFAULT_TITLE" = "New Group";
/* An indicator that a user is a member of the new group. */ /* An indicator that a user is a member of the new group. */
"NEW_GROUP_MEMBER_LABEL" = "Member"; "NEW_GROUP_MEMBER_LABEL" = "Member";
/* No comment provided by engineer. */ /* Placeholder text for group name field */
"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT" = "Name this group chat"; "NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT" = "Name this group chat";
/* a title for the non-contacts section of the 'new group' view. */ /* a title for the non-contacts section of the 'new group' view. */
@ -853,7 +850,7 @@
/* Label for 'Pager' phone numbers. */ /* Label for 'Pager' phone numbers. */
"PHONE_NUMBER_TYPE_PAGER" = "Pager"; "PHONE_NUMBER_TYPE_PAGER" = "Pager";
/* Label for 'Unknown' phone numbers. */ /* Label used when we don't what kind of phone number it is (e.g. mobile/work/home). */
"PHONE_NUMBER_TYPE_UNKNOWN" = "Unknown"; "PHONE_NUMBER_TYPE_UNKNOWN" = "Unknown";
/* Label for 'Work FAX' phone numbers. */ /* Label for 'Work FAX' phone numbers. */

Loading…
Cancel
Save