Skip to content

Commit

Permalink
Ask for the name when creating a broadcast list
Browse files Browse the repository at this point in the history
  • Loading branch information
Hocuri committed Oct 2, 2023
1 parent 33a729b commit 987db8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
</plurals>
<!-- The placeholder will be replaced by the name of the recipient in a one-to-one chat. -->
<string name="chat_new_one_to_one_hint">Send a message to %1$s; they can even receive it without Delta Chat.</string>
<string name="chat_new_broadcast_hint">In a broadcast list, others will receive messages in their private chats with you.\n\nThe recipients will not be aware of each other.</string>
<string name="chat_new_broadcast_hint">In a broadcast list, the recipients will receive messages in a read-only chat.\n\nThey will not be see the other recipients.</string>
<string name="chat_new_group_hint">Others will only see this group after you sent a first message.</string>
<string name="chat_record_slide_to_cancel">Slide to cancel</string>
<string name="chat_record_explain">Tap and hold to record a voice message, release to send</string>
Expand Down
9 changes: 3 additions & 6 deletions src/org/thoughtcrime/securesms/GroupCreateActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 987db8d

Please sign in to comment.