From 4cbacc9804e69dde0d64bf4c8d8c0bfed7ee3856 Mon Sep 17 00:00:00 2001
From: Sgn-32 <49990901+Sgn-32@users.noreply.github.com>
Date: Sun, 8 May 2022 11:47:29 +0200
Subject: [PATCH] Change text when blocking/unblocking unregistered recipient.
Closes #12239
---
.../org/thoughtcrime/securesms/BlockUnblockDialog.java | 6 ++++--
.../messagerequests/MessageRequestsBottomView.java | 3 ++-
app/src/main/res/values/strings.xml | 7 +++++++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/app/src/main/java/org/thoughtcrime/securesms/BlockUnblockDialog.java b/app/src/main/java/org/thoughtcrime/securesms/BlockUnblockDialog.java
index 0f5dd9966b..5f186ece37 100644
--- a/app/src/main/java/org/thoughtcrime/securesms/BlockUnblockDialog.java
+++ b/app/src/main/java/org/thoughtcrime/securesms/BlockUnblockDialog.java
@@ -83,7 +83,8 @@ public final class BlockUnblockDialog {
builder.setNegativeButton(android.R.string.cancel, null);
} else {
builder.setTitle(resources.getString(R.string.BlockUnblockDialog_block_s, recipient.getDisplayName(context)));
- builder.setMessage(R.string.BlockUnblockDialog_blocked_people_wont_be_able_to_call_you_or_send_you_messages);
+ builder.setMessage(recipient.isRegistered() ? R.string.BlockUnblockDialog_blocked_people_wont_be_able_to_call_you_or_send_you_messages
+ : R.string.BlockUnblockDialog_blocked_people_wont_be_able_to_send_you_messages);
if (onBlockAndReportSpam != null) {
builder.setNeutralButton(android.R.string.cancel, null);
@@ -128,7 +129,8 @@ public final class BlockUnblockDialog {
builder.setNegativeButton(android.R.string.cancel, null);
} else {
builder.setTitle(resources.getString(R.string.BlockUnblockDialog_unblock_s, recipient.getDisplayName(context)));
- builder.setMessage(R.string.BlockUnblockDialog_you_will_be_able_to_call_and_message_each_other);
+ builder.setMessage(recipient.isRegistered() ? R.string.BlockUnblockDialog_you_will_be_able_to_call_and_message_each_other
+ : R.string.BlockUnblockDialog_you_will_be_able_to_message_each_other);
builder.setPositiveButton(R.string.RecipientPreferenceActivity_unblock, ((dialog, which) -> onUnblock.run()));
builder.setNegativeButton(android.R.string.cancel, null);
}
diff --git a/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsBottomView.java b/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsBottomView.java
index 43cfd275e4..0595520e90 100644
--- a/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsBottomView.java
+++ b/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsBottomView.java
@@ -76,7 +76,8 @@ public class MessageRequestsBottomView extends ConstraintLayout {
switch (messageData.getMessageState()) {
case BLOCKED_INDIVIDUAL:
int message = recipient.isReleaseNotes() ? R.string.MessageRequestBottomView_get_updates_and_news_from_s_you_wont_receive_any_updates_until_you_unblock_them
- : R.string.MessageRequestBottomView_do_you_want_to_let_s_message_you_wont_receive_any_messages_until_you_unblock_them;
+ : recipient.isRegistered() ? R.string.MessageRequestBottomView_do_you_want_to_let_s_message_you_wont_receive_any_messages_until_you_unblock_them
+ : R.string.MessageRequestBottomView_do_you_want_to_let_s_message_you_wont_receive_any_messages_until_you_unblock_them_SMS;
question.setText(HtmlCompat.fromHtml(getContext().getString(message,
HtmlUtil.bold(recipient.getShortDisplayName(getContext()))), 0));
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 273785340e..8f078f9f16 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -114,8 +114,12 @@
You will no longer receive messages or updates from this group, and members won\'t be able to add you to this group again.
Group members won\'t be able to add you to this group again.
Group members will be able to add you to this group again.
+
You will be able to message and call each other and your name and photo will be shared with them.
+
+ You will be able to message each other.
Blocked people won\'t be able to call you or send you messages.
+ Blocked people won\'t be able to send you messages.
Block getting Signal updates and news.
@@ -1316,7 +1320,10 @@
Block
Unblock
Let %1$s message you and share your name and photo with them? They won\'t know you\'ve seen their message until you accept.
+
Let %1$s message you and share your name and photo with them? You won\'t receive any messages until you unblock them.
+
+ Let %1$s message you? You won\'t receive any messages until you unblock them.
Get updates and news from %1$s? You won\'t receive any updates until you unblock them.
Continue your conversation with this group and share your name and photo with its members?
Upgrade this group to activate new features like @mentions and admins. Members who have not shared their name or photo in this group will be invited to join.