mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-25 18:28:28 +00:00
Various groups V2 dialog copy changes.
This commit is contained in:
parent
4e25e8aaa2
commit
fe33ce3413
@ -77,27 +77,26 @@ public final class LeaveGroupDialog {
|
||||
|
||||
private void showSelectNewAdminDialog() {
|
||||
new AlertDialog.Builder(activity)
|
||||
.setTitle(R.string.ConversationActivity_choose_new_admin)
|
||||
.setMessage(R.string.ConversationActivity_before_you_leave_you_must_choose_at_least_one_new_admin_for_this_group)
|
||||
.setTitle(R.string.LeaveGroupDialog_choose_new_admin)
|
||||
.setMessage(R.string.LeaveGroupDialog_before_you_leave_you_must_choose_at_least_one_new_admin_for_this_group)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(R.string.ConversationActivity_choose_admin, (d,w) -> activity.startActivity(ChooseNewAdminActivity.createIntent(activity, groupId.requireV2())))
|
||||
.setPositiveButton(R.string.LeaveGroupDialog_choose_admin, (d,w) -> activity.startActivity(ChooseNewAdminActivity.createIntent(activity, groupId.requireV2())))
|
||||
.show();
|
||||
}
|
||||
|
||||
private void showLeaveDialog() {
|
||||
new AlertDialog.Builder(activity)
|
||||
.setTitle(R.string.ConversationActivity_leave_group)
|
||||
.setIconAttribute(R.attr.dialog_info_icon)
|
||||
.setTitle(R.string.LeaveGroupDialog_leave_group)
|
||||
.setCancelable(true)
|
||||
.setMessage(R.string.ConversationActivity_are_you_sure_you_want_to_leave_this_group)
|
||||
.setPositiveButton(R.string.yes, (dialog, which) -> {
|
||||
.setMessage(R.string.LeaveGroupDialog_you_will_no_longer_be_able_to_send_or_receive_messages_in_this_group)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(R.string.LeaveGroupDialog_leave, (dialog, which) -> {
|
||||
AlertDialog progressDialog = SimpleProgressDialog.show(activity);
|
||||
SimpleTask.run(activity.getLifecycle(), this::leaveGroup, result -> {
|
||||
progressDialog.dismiss();
|
||||
handleLeaveGroupResult(result);
|
||||
});
|
||||
})
|
||||
.setNegativeButton(R.string.no, null)
|
||||
.show();
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class AddMembersActivity extends PushContactSelectionActivity {
|
||||
return new AlertDialog.Builder(this)
|
||||
.setMessage(" ")
|
||||
.setNegativeButton(android.R.string.cancel, (dialog, which) -> dialog.cancel())
|
||||
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
|
||||
.setPositiveButton(R.string.AddMembersActivity__add, (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
onFinishedSelection();
|
||||
})
|
||||
|
@ -88,7 +88,7 @@ public final class AddToGroupsActivity extends ContactSelectionActivity {
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle(addEvent.getTitle())
|
||||
.setMessage(addEvent.getMessage())
|
||||
.setPositiveButton(android.R.string.ok, (dialog, which) -> viewModel.onAddToGroupsConfirmed(addEvent))
|
||||
.setPositiveButton(R.string.AddToGroupActivity_add, (dialog, which) -> viewModel.onAddToGroupsConfirmed(addEvent))
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.show();
|
||||
} else if (event instanceof Event.LegacyGroupDenialEvent) {
|
||||
|
@ -47,10 +47,10 @@ public final class GroupRightsDialog {
|
||||
|
||||
public enum Type {
|
||||
|
||||
MEMBERSHIP(R.string.ManageGroupActivity_choose_who_can_add_or_invite_new_members,
|
||||
MEMBERSHIP(R.string.ManageGroupActivity_who_can_add_new_members,
|
||||
R.array.GroupManagement_edit_group_membership_choices),
|
||||
|
||||
ATTRIBUTES(R.string.ManageGroupActivity_choose_who_can_edit_the_group_name_avatar_and_disappearing_messages,
|
||||
ATTRIBUTES(R.string.ManageGroupActivity_who_can_edit_this_groups_info,
|
||||
R.array.GroupManagement_edit_group_info_choices);
|
||||
|
||||
@StringRes private final int message;
|
||||
|
@ -74,12 +74,6 @@ final class RecipientDialogRepository {
|
||||
});
|
||||
}
|
||||
|
||||
void getGroupName(@NonNull Consumer<String> stringConsumer) {
|
||||
SimpleTask.run(SignalExecutors.BOUNDED,
|
||||
() -> DatabaseFactory.getGroupDatabase(context).requireGroup(Objects.requireNonNull(groupId)).getTitle(),
|
||||
stringConsumer::accept);
|
||||
}
|
||||
|
||||
void removeMember(@NonNull Consumer<Boolean> onComplete, @NonNull GroupChangeErrorCallback error) {
|
||||
SimpleTask.run(SignalExecutors.UNBOUNDED,
|
||||
() -> {
|
||||
|
@ -178,22 +178,21 @@ final class RecipientDialogViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
void onRemoveFromGroupClicked(@NonNull Activity activity, @NonNull Runnable onSuccess) {
|
||||
recipientDialogRepository.getGroupName(title ->
|
||||
new AlertDialog.Builder(activity)
|
||||
.setMessage(context.getString(R.string.RecipientBottomSheet_remove_s_from_s, Objects.requireNonNull(recipient.getValue()).getDisplayName(context), title))
|
||||
.setPositiveButton(R.string.RecipientBottomSheet_remove,
|
||||
(dialog, which) -> {
|
||||
adminActionBusy.setValue(true);
|
||||
recipientDialogRepository.removeMember(result -> {
|
||||
adminActionBusy.setValue(false);
|
||||
if (result) {
|
||||
onSuccess.run();
|
||||
}
|
||||
},
|
||||
this::showErrorToast);
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, (dialog, which) -> {})
|
||||
.show());
|
||||
new AlertDialog.Builder(activity)
|
||||
.setMessage(context.getString(R.string.RecipientBottomSheet_remove_s_from_the_group, Objects.requireNonNull(recipient.getValue()).getDisplayName(context)))
|
||||
.setPositiveButton(R.string.RecipientBottomSheet_remove,
|
||||
(dialog, which) -> {
|
||||
adminActionBusy.setValue(true);
|
||||
recipientDialogRepository.removeMember(result -> {
|
||||
adminActionBusy.setValue(false);
|
||||
if (result) {
|
||||
onSuccess.run();
|
||||
}
|
||||
},
|
||||
this::showErrorToast);
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, (dialog, which) -> {})
|
||||
.show();
|
||||
}
|
||||
|
||||
void onAddedToContacts() {
|
||||
|
@ -445,10 +445,10 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/edit_group_access_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/group_manage_fragment_row_height"
|
||||
android:background="?selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
@ -456,53 +456,28 @@
|
||||
<TextView
|
||||
android:id="@+id/edit_group_access_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:gravity="center_vertical|start"
|
||||
android:paddingStart="@dimen/group_manage_fragment_row_horizontal_padding"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="@dimen/group_manage_fragment_row_horizontal_padding"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/ManageGroupActivity_edit_group_info"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/Signal.Text.Body"
|
||||
app:layout_constraintEnd_toStartOf="@+id/edit_group_access_value"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:textAppearance="@style/Signal.Text.Body" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/edit_group_access_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="end"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical|end"
|
||||
android:minWidth="136dp"
|
||||
android:paddingStart="@dimen/group_manage_fragment_row_horizontal_padding"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="@dimen/group_manage_fragment_row_horizontal_padding"
|
||||
android:textAppearance="@style/Signal.Text.Body"
|
||||
android:textColor="@color/ultramarine_text_button"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="All members" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:paddingStart="@dimen/group_manage_fragment_row_horizontal_padding"
|
||||
android:paddingEnd="@dimen/group_manage_fragment_row_horizontal_padding"
|
||||
android:paddingBottom="16dp"
|
||||
android:text="@string/ManageGroupActivity_choose_who_can_edit_the_group_name_avatar_and_disappearing_messages"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/Signal.Text.Caption"
|
||||
android:textColor="?title_text_color_secondary"
|
||||
app:layout_constraintEnd_toEndOf="@+id/edit_group_access_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/edit_group_access_title" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -236,11 +236,6 @@
|
||||
<string name="ConversationActivity_added_to_home_screen">Added to home screen</string>
|
||||
<string name="ConversationActivity_calls_not_supported">Calls not supported</string>
|
||||
<string name="ConversationActivity_this_device_does_not_appear_to_support_dial_actions">This device does not appear to support dial actions.</string>
|
||||
<string name="ConversationActivity_leave_group">Leave group?</string>
|
||||
<string name="ConversationActivity_are_you_sure_you_want_to_leave_this_group">Are you sure you want to leave this group?</string>
|
||||
<string name="ConversationActivity_choose_new_admin">Choose new admin</string>
|
||||
<string name="ConversationActivity_before_you_leave_you_must_choose_at_least_one_new_admin_for_this_group">Before you leave, you must choose at least one new admin for this group.</string>
|
||||
<string name="ConversationActivity_choose_admin">Choose admin</string>
|
||||
<string name="ConversationActivity_transport_insecure_sms">Insecure SMS</string>
|
||||
<string name="ConversationActivity_transport_insecure_mms">Insecure MMS</string>
|
||||
<string name="ConversationActivity_transport_signal">Signal</string>
|
||||
@ -466,6 +461,7 @@
|
||||
<string name="AddToGroupActivity_add_to_group">Add to group</string>
|
||||
<string name="AddToGroupActivity_add_to_groups">Add to groups</string>
|
||||
<string name="AddToGroupActivity_this_person_cant_be_added_to_legacy_groups">This person can\'t be added to legacy groups.</string>
|
||||
<string name="AddToGroupActivity_add">Add</string>
|
||||
|
||||
<!-- ChooseNewAdminActivity -->
|
||||
<string name="ChooseNewAdminActivity_choose_new_admin">Choose new admin</string>
|
||||
@ -504,6 +500,14 @@
|
||||
<string name="GroupManagement_learn_more">Learn more</string>
|
||||
<string name="GroupManagement_invite_multiple_users">These users can’t be automatically added to this group by you.\n\nThey’ve been invited to join the group, and won’t see any group messages until they accept.</string>
|
||||
|
||||
<!-- LeaveGroupDialog -->
|
||||
<string name="LeaveGroupDialog_leave_group">Leave group?</string>
|
||||
<string name="LeaveGroupDialog_you_will_no_longer_be_able_to_send_or_receive_messages_in_this_group">You will no longer be able to send or receive messages in this group.</string>
|
||||
<string name="LeaveGroupDialog_leave">Leave</string>
|
||||
<string name="LeaveGroupDialog_choose_new_admin">Choose new admin</string>
|
||||
<string name="LeaveGroupDialog_before_you_leave_you_must_choose_at_least_one_new_admin_for_this_group">Before you leave, you must choose at least one new admin for this group.</string>
|
||||
<string name="LeaveGroupDialog_choose_admin">Choose admin</string>
|
||||
|
||||
<!-- LinkPreviewsMegaphone -->
|
||||
<string name="LinkPreviewsMegaphone_disable">Disable</string>
|
||||
<string name="LinkPreviewsMegaphone_preview_any_link">Preview any link</string>
|
||||
@ -555,6 +559,7 @@
|
||||
<item quantity="one">Add \"%1$s\" to \"%2$s\"?</item>
|
||||
<item quantity="other">Add %3$d members to \"%2$s\"?</item>
|
||||
</plurals>
|
||||
<string name="AddMembersActivity__add">Add</string>
|
||||
|
||||
<!-- AddGroupDetailsFragment -->
|
||||
<string name="AddGroupDetailsFragment__name_this_group">Name this group</string>
|
||||
@ -588,8 +593,8 @@
|
||||
<string name="ManageGroupActivity_member_requests_and_invites">Member requests & invites</string>
|
||||
<string name="ManageGroupActivity_add_members">Add members</string>
|
||||
<string name="ManageGroupActivity_edit_group_info">Edit group info</string>
|
||||
<string name="ManageGroupActivity_choose_who_can_edit_the_group_name_avatar_and_disappearing_messages">Choose who can edit the group name, avatar, and disappearing messages.</string>
|
||||
<string name="ManageGroupActivity_choose_who_can_add_or_invite_new_members">Choose who can add or invite new members.</string>
|
||||
<string name="ManageGroupActivity_who_can_add_new_members">Who can add new members?</string>
|
||||
<string name="ManageGroupActivity_who_can_edit_this_groups_info">Who can edit this group\'s info?</string>
|
||||
<string name="ManageGroupActivity_group_link">Group link</string>
|
||||
<string name="ManageGroupActivity_block_group">Block group</string>
|
||||
<string name="ManageGroupActivity_unblock_group">Unblock group</string>
|
||||
@ -2644,9 +2649,9 @@
|
||||
<string name="RecipientBottomSheet_video_call_description">Video call</string>
|
||||
|
||||
<string name="RecipientBottomSheet_remove_s_as_group_admin">Remove %1$s as group admin?</string>
|
||||
<string name="RecipientBottomSheet_s_will_be_able_to_edit_group">%1$s will be able to edit this group and its members</string>
|
||||
<string name="RecipientBottomSheet_s_will_be_able_to_edit_group">"%1$s" will be able to edit this group and its members.</string>
|
||||
|
||||
<string name="RecipientBottomSheet_remove_s_from_s">Remove %1$s from "%2$s"?</string>
|
||||
<string name="RecipientBottomSheet_remove_s_from_the_group">Remove %1$s from the group?</string>
|
||||
<string name="RecipientBottomSheet_remove">Remove</string>
|
||||
<string name="RecipientBottomSheet_copied_to_clipboard">Copied to clipboard</string>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user