Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask for the name when creating a broadcast list #2653

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, recipients will receive messages in a read-only chat with you.</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