From b80a938dc761f4d233cb18c14101f8ef9ffb41d4 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Sun, 17 Sep 2023 16:33:50 +0200 Subject: [PATCH 1/3] Ask for the name when creating a broadcast list --- res/values/strings.xml | 2 +- src/org/thoughtcrime/securesms/GroupCreateActivity.java | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 34720d639d..96f6e3f6e0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -376,7 +376,7 @@ Send a message to %1$s; they can even receive it without Delta Chat. - In a broadcast list, others will receive messages in their private chats with you.\n\nThe recipients will not be aware of each other. + In a broadcast list, the recipients will receive messages in a read-only chat.\n\nThey will not be see the other recipients. Others will only see this group after you sent a first message. Slide to cancel Tap and hold to record a voice message, release to send diff --git a/src/org/thoughtcrime/securesms/GroupCreateActivity.java b/src/org/thoughtcrime/securesms/GroupCreateActivity.java index 5dd52197a9..66927dc4c0 100644 --- a/src/org/thoughtcrime/securesms/GroupCreateActivity.java +++ b/src/org/thoughtcrime/securesms/GroupCreateActivity.java @@ -232,10 +232,6 @@ private void initializeResources() { initializeAvatarView(); if (broadcast) { - ViewUtil.findById(this, R.id.group_image_holder).setVisibility(isEdit()? View.VISIBLE : View.GONE); - avatar.setVisibility(View.GONE); - groupName.setVisibility(isEdit()? View.VISIBLE : View.GONE); - groupName.setHint(R.string.name_desktop); groupHints.setText(R.string.chat_new_broadcast_hint); groupHints.setVisibility(isEdit()? View.GONE : View.VISIBLE); ViewUtil.findById(this, R.id.verify_button).setVisibility(View.INVISIBLE); @@ -329,11 +325,12 @@ public void onRecipientDeleted(Recipient recipient) { } private void groupCreateInDb() { + String groupName = getGroupName(); + if (showGroupNameEmptyToast(groupName)) return; if (broadcast) { groupChatId = dcContext.createBroadcastList(); + dcContext.setChatName(groupChatId, groupName); } else { - String groupName = getGroupName(); - if (showGroupNameEmptyToast(groupName)) return; groupChatId = dcContext.createGroupChat(verified, groupName); } From bbb525026c3b83575262c570720635a45ad13d51 Mon Sep 17 00:00:00 2001 From: bjoern Date: Mon, 16 Oct 2023 11:39:32 +0200 Subject: [PATCH 2/3] Update res/values/strings.xml Co-authored-by: Hocuri --- res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 96f6e3f6e0..f2c6fea566 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -376,7 +376,7 @@ Send a message to %1$s; they can even receive it without Delta Chat. - In a broadcast list, the recipients will receive messages in a read-only chat.\n\nThey will not be see the other recipients. + In a broadcast list, recipients will receive messages in a read-only chat with you. Others will only see this group after you sent a first message. Slide to cancel Tap and hold to record a voice message, release to send From 3accbd359e54bc98b70eb621cfbe5650f9c6247e Mon Sep 17 00:00:00 2001 From: Hocuri Date: Tue, 17 Oct 2023 16:57:25 +0200 Subject: [PATCH 3/3] Don't allow to set the avatar for broadcast lists --- src/org/thoughtcrime/securesms/GroupCreateActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/thoughtcrime/securesms/GroupCreateActivity.java b/src/org/thoughtcrime/securesms/GroupCreateActivity.java index 66927dc4c0..ac496f2496 100644 --- a/src/org/thoughtcrime/securesms/GroupCreateActivity.java +++ b/src/org/thoughtcrime/securesms/GroupCreateActivity.java @@ -232,6 +232,7 @@ private void initializeResources() { initializeAvatarView(); if (broadcast) { + avatar.setVisibility(View.GONE); groupHints.setText(R.string.chat_new_broadcast_hint); groupHints.setVisibility(isEdit()? View.GONE : View.VISIBLE); ViewUtil.findById(this, R.id.verify_button).setVisibility(View.INVISIBLE);