mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 17:23:38 +00:00
show total number of messages or threads to be deleted
in delete-confirm-dialogs Closes #4284 // FREEBIE
This commit is contained in:
parent
24bcea393f
commit
328a3ff20e
@ -131,8 +131,14 @@
|
||||
<string name="ConversationFragment_message_details">Message details</string>
|
||||
<string name="ConversationFragment_transport_s_sent_received_s">Transport: %1$s\nSent/Received: %2$s</string>
|
||||
<string name="ConversationFragment_sender_s_transport_s_sent_s_received_s">Sender: %1$s\nTransport: %2$s\nSent: %3$s\nReceived: %4$s</string>
|
||||
<string name="ConversationFragment_confirm_message_delete">Confirm message delete</string>
|
||||
<string name="ConversationFragment_are_you_sure_you_want_to_permanently_delete_all_selected_messages">Are you sure that you want to permanently delete all selected messages?</string>
|
||||
<plurals name="ConversationFragment_delete_selected_messages">
|
||||
<item quantity="one">Delete selected message?</item>
|
||||
<item quantity="other">Delete selected messages?</item>
|
||||
</plurals>
|
||||
<plurals name="ConversationFragment_this_will_permanently_delete_all_n_selected_messages">
|
||||
<item quantity="one">This will permanently delete the selected message.</item>
|
||||
<item quantity="other">This will permanently delete all %1$d selected messages.</item>
|
||||
</plurals>
|
||||
<string name="ConversationFragment_save_to_sd_card">Save to storage?</string>
|
||||
<string name="ConversationFragment_this_media_has_been_stored_in_an_encrypted_database_warning">Saving this media to storage will allow any other apps on your phone to access it.\n\nContinue?</string>
|
||||
<string name="ConversationFragment_error_while_saving_attachment_to_sd_card">Error while saving attachment to storage!</string>
|
||||
@ -151,8 +157,14 @@
|
||||
<string name="ConversationListActivity_search">Search...</string>
|
||||
|
||||
<!-- ConversationListFragment -->
|
||||
<string name="ConversationListFragment_delete_threads_question">Delete threads?</string>
|
||||
<string name="ConversationListFragment_are_you_sure_you_wish_to_delete_all_selected_conversation_threads">Are you sure you wish to delete ALL selected conversation threads?</string>
|
||||
<plurals name="ConversationListFragment_delete_selected_conversations">
|
||||
<item quantity="one">Delete selected conversation?</item>
|
||||
<item quantity="other">Delete selected conversations?</item>
|
||||
</plurals>
|
||||
<plurals name="ConversationListFragment_this_will_permanently_delete_all_n_selected_conversations">
|
||||
<item quantity="one">This will permanently delete the selected conversation.</item>
|
||||
<item quantity="other">This will permanently delete all %1$d selected conversations.</item>
|
||||
</plurals>
|
||||
<string name="ConversationListFragment_deleting">Deleting</string>
|
||||
<string name="ConversationListFragment_deleting_selected_threads">Deleting selected threads...</string>
|
||||
|
||||
|
@ -236,11 +236,17 @@ public class ConversationFragment extends Fragment
|
||||
}
|
||||
|
||||
private void handleDeleteMessages(final Set<MessageRecord> messageRecords) {
|
||||
int messagesCount = messageRecords.size();
|
||||
AlertDialogWrapper.Builder builder = new AlertDialogWrapper.Builder(getActivity());
|
||||
builder.setTitle(R.string.ConversationFragment_confirm_message_delete);
|
||||
builder.setIconAttribute(R.attr.dialog_alert_icon);
|
||||
builder.setTitle(getContext().getResources().getQuantityString(
|
||||
R.plurals.ConversationFragment_delete_selected_messages,
|
||||
messagesCount, messagesCount));
|
||||
builder.setMessage(getContext().getResources().getQuantityString(
|
||||
R.plurals.ConversationFragment_this_will_permanently_delete_all_n_selected_messages,
|
||||
messagesCount, messagesCount));
|
||||
builder.setCancelable(true);
|
||||
builder.setMessage(R.string.ConversationFragment_are_you_sure_you_want_to_permanently_delete_all_selected_messages);
|
||||
|
||||
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
@ -171,10 +171,15 @@ public class ConversationListFragment extends Fragment
|
||||
}
|
||||
|
||||
private void handleDeleteAllSelected() {
|
||||
int conversationsCount = getListAdapter().getBatchSelections().size();
|
||||
AlertDialogWrapper.Builder alert = new AlertDialogWrapper.Builder(getActivity());
|
||||
alert.setIconAttribute(R.attr.dialog_alert_icon);
|
||||
alert.setTitle(R.string.ConversationListFragment_delete_threads_question);
|
||||
alert.setMessage(R.string.ConversationListFragment_are_you_sure_you_wish_to_delete_all_selected_conversation_threads);
|
||||
alert.setTitle(getContext().getResources().getQuantityString(
|
||||
R.plurals.ConversationListFragment_delete_selected_conversations,
|
||||
conversationsCount, conversationsCount));
|
||||
alert.setMessage(getContext().getResources().getQuantityString(
|
||||
R.plurals.ConversationListFragment_this_will_permanently_delete_all_n_selected_conversations,
|
||||
conversationsCount, conversationsCount));
|
||||
alert.setCancelable(true);
|
||||
|
||||
alert.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user