|
|
@ -129,24 +129,20 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
|
|
// If there are "no longer verified" members of the group,
|
|
|
|
// If there are "no longer verified" members of the group,
|
|
|
|
// highlight them in a special section.
|
|
|
|
// highlight them in a special section.
|
|
|
|
NSSet<NSString *> *noLongerVerifiedRecipientIds = [NSSet setWithArray:[self noLongerVerifiedRecipientIds]];
|
|
|
|
NSArray<NSString *> *noLongerVerifiedRecipientIds = [self noLongerVerifiedRecipientIds];
|
|
|
|
if (noLongerVerifiedRecipientIds.count > 0) {
|
|
|
|
if (noLongerVerifiedRecipientIds.count > 0) {
|
|
|
|
OWSTableSection *noLongerVerifiedSection = [OWSTableSection new];
|
|
|
|
OWSTableSection *noLongerVerifiedSection = [OWSTableSection new];
|
|
|
|
noLongerVerifiedSection.headerTitle = NSLocalizedString(@"GROUP_MEMBERS_SECTION_TITLE_NO_LONGER_VERIFIED",
|
|
|
|
noLongerVerifiedSection.headerTitle = NSLocalizedString(@"GROUP_MEMBERS_SECTION_TITLE_NO_LONGER_VERIFIED",
|
|
|
|
@"Title for the 'no longer verified' section of the 'group members' view.");
|
|
|
|
@"Title for the 'no longer verified' section of the 'group members' view.");
|
|
|
|
membersSection.headerTitle = NSLocalizedString(
|
|
|
|
membersSection.headerTitle = NSLocalizedString(
|
|
|
|
@"GROUP_MEMBERS_SECTION_TITLE_MEMBERS", @"Title for the 'members' section of the 'group members' view.");
|
|
|
|
@"GROUP_MEMBERS_SECTION_TITLE_MEMBERS", @"Title for the 'members' section of the 'group members' view.");
|
|
|
|
[self addMembers:noLongerVerifiedRecipientIds.allObjects
|
|
|
|
[self addMembers:noLongerVerifiedRecipientIds toSection:noLongerVerifiedSection];
|
|
|
|
toSection:noLongerVerifiedSection
|
|
|
|
|
|
|
|
noLongerVerifiedRecipientIds:noLongerVerifiedRecipientIds];
|
|
|
|
|
|
|
|
[contents addSection:noLongerVerifiedSection];
|
|
|
|
[contents addSection:noLongerVerifiedSection];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NSMutableSet *memberRecipientIds = [self.memberRecipientIds mutableCopy];
|
|
|
|
NSMutableSet *memberRecipientIds = [self.memberRecipientIds mutableCopy];
|
|
|
|
[memberRecipientIds removeObject:[helper localNumber]];
|
|
|
|
[memberRecipientIds removeObject:[helper localNumber]];
|
|
|
|
[self addMembers:memberRecipientIds.allObjects
|
|
|
|
[self addMembers:memberRecipientIds.allObjects toSection:membersSection];
|
|
|
|
toSection:membersSection
|
|
|
|
|
|
|
|
noLongerVerifiedRecipientIds:noLongerVerifiedRecipientIds];
|
|
|
|
|
|
|
|
[contents addSection:membersSection];
|
|
|
|
[contents addSection:membersSection];
|
|
|
|
|
|
|
|
|
|
|
|
self.contents = contents;
|
|
|
|
self.contents = contents;
|
|
|
@ -154,11 +150,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
|
|
- (void)addMembers:(NSArray<NSString *> *)recipientIds
|
|
|
|
- (void)addMembers:(NSArray<NSString *> *)recipientIds
|
|
|
|
toSection:(OWSTableSection *)section
|
|
|
|
toSection:(OWSTableSection *)section
|
|
|
|
noLongerVerifiedRecipientIds:(NSSet<NSString *> *)noLongerVerifiedRecipientIds
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
OWSAssert(recipientIds);
|
|
|
|
OWSAssert(recipientIds);
|
|
|
|
OWSAssert(section);
|
|
|
|
OWSAssert(section);
|
|
|
|
OWSAssert(noLongerVerifiedRecipientIds);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__weak ShowGroupMembersViewController *weakSelf = self;
|
|
|
|
__weak ShowGroupMembersViewController *weakSelf = self;
|
|
|
|
ContactsViewHelper *helper = self.contactsViewHelper;
|
|
|
|
ContactsViewHelper *helper = self.contactsViewHelper;
|
|
|
@ -169,7 +163,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
|
|
ContactTableViewCell *cell = [ContactTableViewCell new];
|
|
|
|
ContactTableViewCell *cell = [ContactTableViewCell new];
|
|
|
|
SignalAccount *signalAccount = [helper signalAccountForRecipientId:recipientId];
|
|
|
|
SignalAccount *signalAccount = [helper signalAccountForRecipientId:recipientId];
|
|
|
|
BOOL isNoLongerVerified = [noLongerVerifiedRecipientIds containsObject:recipientId];
|
|
|
|
OWSVerificationState verificationState =
|
|
|
|
|
|
|
|
[[OWSIdentityManager sharedManager] verificationStateForRecipientId:recipientId];
|
|
|
|
|
|
|
|
BOOL isVerified = verificationState == OWSVerificationStateVerified;
|
|
|
|
|
|
|
|
BOOL isNoLongerVerified = verificationState == OWSVerificationStateNoLongerVerified;
|
|
|
|
BOOL isBlocked = [helper isRecipientIdBlocked:recipientId];
|
|
|
|
BOOL isBlocked = [helper isRecipientIdBlocked:recipientId];
|
|
|
|
if (isNoLongerVerified) {
|
|
|
|
if (isNoLongerVerified) {
|
|
|
|
cell.accessoryMessage = NSLocalizedString(
|
|
|
|
cell.accessoryMessage = NSLocalizedString(
|
|
|
@ -185,8 +182,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
[cell configureWithRecipientId:recipientId contactsManager:helper.contactsManager];
|
|
|
|
[cell configureWithRecipientId:recipientId contactsManager:helper.contactsManager];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL isVerified = [[OWSIdentityManager sharedManager] verificationStateForRecipientId:recipientId]
|
|
|
|
|
|
|
|
== OWSVerificationStateVerified;
|
|
|
|
|
|
|
|
if (isVerified) {
|
|
|
|
if (isVerified) {
|
|
|
|
[cell addVerifiedSubtitle];
|
|
|
|
[cell addVerifiedSubtitle];
|
|
|
|
}
|
|
|
|
}
|
|
|
|