diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index f10b425eb..95b91a4be 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -258,7 +258,7 @@ "BLOCK_LIST_VIEW_BLOCK_BUTTON" = "Block"; /* The message format of the 'conversation blocked' alert. Embeds the {{conversation title}}. */ -"BLOCK_LIST_VIEW_BLOCKED_ALERT_MESSAGE_FORMAT" = "%@ has been blocked"; +"BLOCK_LIST_VIEW_BLOCKED_ALERT_MESSAGE_FORMAT" = "%@ has been blocked."; /* The title of the 'user blocked' alert. */ "BLOCK_LIST_VIEW_BLOCKED_ALERT_TITLE" = "User Blocked"; @@ -272,11 +272,11 @@ /* The title of the 'You can't block yourself' alert. */ "BLOCK_LIST_VIEW_CANT_BLOCK_SELF_ALERT_TITLE" = "Error"; -/* Alert body after unblocking a group or 1:1 chat. Embeds the conversation title. */ -"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_MESSAGE_FORMAT" = "%@ has been unblocked."; +/* Alert title after unblocking a group or 1:1 chat. Embeds the {{conversation title}}. */ +"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE_FORMAT" = "%@ has been unblocked."; -/* Alert title after unblocking a group or 1:1 chat. */ -"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE" = "Unblocked"; +/* Alert body after unblocking a group. */ +"BLOCK_LIST_VIEW_UNBLOCKED_GROUP_ALERT_BODY" = "Existing members can now add you to the group again."; /* Action sheet that will block an unknown user. */ "BLOCK_OFFER_ACTIONSHEET_BLOCK_ACTION" = "Block"; diff --git a/SignalMessaging/utils/BlockListUIUtils.m b/SignalMessaging/utils/BlockListUIUtils.m index 58d83b7e5..d53072c37 100644 --- a/SignalMessaging/utils/BlockListUIUtils.m +++ b/SignalMessaging/utils/BlockListUIUtils.m @@ -381,15 +381,11 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); [blockingManager removeBlockedPhoneNumber:phoneNumber]; } - [self showOkAlertWithTitle:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE", - @"Alert title after unblocking a group or 1:1 chat.") - message:[NSString - stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_MESSAGE_FORMAT", - @"Alert body after unblocking a group or 1:1 chat. Embeds the " - @"conversation title."), - [self formatDisplayNameForAlertMessage:displayName]] - fromViewController:fromViewController - completionBlock:completionBlock]; + NSString *titleFormat = NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE_FORMAT", + @"Alert title after unblocking a group or 1:1 chat. Embeds the {{conversation title}}."); + NSString *title = [NSString stringWithFormat:titleFormat, [self formatDisplayNameForAlertMessage:displayName]]; + + [self showOkAlertWithTitle:title message:nil fromViewController:fromViewController completionBlock:completionBlock]; } + (void)showUnblockGroupActionSheet:(TSGroupModel *)groupModel @@ -456,13 +452,14 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); [blockingManager removeBlockedGroupId:groupModel.groupId]; - [self showOkAlertWithTitle:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE", - @"Alert title after unblocking a group or 1:1 chat.") - message:[NSString - stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_MESSAGE_FORMAT", - @"Alert body after unblocking a group or 1:1 chat. Embeds the " - @"conversation title."), - [self formatDisplayNameForAlertMessage:displayName]] + NSString *titleFormat = NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE_FORMAT", + @"Alert title after unblocking a group or 1:1 chat. Embeds the {{conversation title}}."); + NSString *title = [NSString stringWithFormat:titleFormat, [self formatDisplayNameForAlertMessage:displayName]]; + + NSString *message + = NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_GROUP_ALERT_BODY", @"Alert body after unblocking a group."); + [self showOkAlertWithTitle:title + message:message fromViewController:fromViewController completionBlock:completionBlock]; } @@ -470,12 +467,12 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); #pragma mark - UI + (void)showOkAlertWithTitle:(NSString *)title - message:(NSString *)message + message:(nullable NSString *)message fromViewController:(UIViewController *)fromViewController completionBlock:(BlockAlertCompletionBlock)completionBlock { OWSAssert(title.length > 0); - OWSAssert(message.length > 0); + OWSAssert(fromViewController); UIAlertController *controller =