diff --git a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m index 56ab7e54f..fa2c105f1 100644 --- a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m +++ b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m @@ -810,34 +810,19 @@ const CGFloat kIconViewLength = 24; } // Block Conversation section. - /** - * Loki: Original code - * ======== - if (!isNoteToSelf) { - OWSTableSection *section = [OWSTableSection new]; - if (self.thread.isGroupThread) { - section.footerTitle = NSLocalizedString( - @"BLOCK_GROUP_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking a group."); - } else { - section.footerTitle = NSLocalizedString( - @"BLOCK_USER_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user."); - } + if (!isNoteToSelf && [self.thread isKindOfClass:TSContactThread.class]) { + mainSection.footerTitle = NSLocalizedString( + @"BLOCK_USER_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user."); - [section addItem:[OWSTableItem + [mainSection addItem:[OWSTableItem itemWithCustomCellBlock:^{ OWSConversationSettingsViewController *strongSelf = weakSelf; if (!strongSelf) { return [UITableViewCell new]; } - NSString *cellTitle; - if (strongSelf.thread.isGroupThread) { - cellTitle = NSLocalizedString(@"CONVERSATION_SETTINGS_BLOCK_THIS_GROUP", - @"table cell label in conversation settings"); - } else { - cellTitle = NSLocalizedString(@"CONVERSATION_SETTINGS_BLOCK_THIS_USER", - @"table cell label in conversation settings"); - } + NSString *cellTitle = NSLocalizedString(@"CONVERSATION_SETTINGS_BLOCK_THIS_USER", + @"table cell label in conversation settings"); UITableViewCell *cell = [strongSelf disclosureCellWithName:cellTitle iconName:@"table_ic_block" @@ -857,10 +842,7 @@ const CGFloat kIconViewLength = 24; return cell; } actionBlock:nil]]; - [contents addSection:section]; } - * ======== - */ self.contents = contents; } diff --git a/SignalMessaging/utils/BlockListUIUtils.m b/SignalMessaging/utils/BlockListUIUtils.m index 833724dc8..c827ae9fd 100644 --- a/SignalMessaging/utils/BlockListUIUtils.m +++ b/SignalMessaging/utils/BlockListUIUtils.m @@ -291,7 +291,7 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); contactsManager:(OWSContactsManager *)contactsManager completionBlock:(nullable BlockActionCompletionBlock)completionBlock { - NSString *displayName = [LKUserDisplayNameUtilities getPrivateChatDisplayNameFor:phoneNumber]; + NSString *displayName = [LKUserDisplayNameUtilities getPrivateChatDisplayNameFor:phoneNumber] ?: phoneNumber; [self showUnblockPhoneNumbersActionSheet:@[ phoneNumber ] displayName:displayName fromViewController:fromViewController