aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index eddf5abdc..c38072dbe 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -1719,7 +1719,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
}
builder.setView(dialogView);
builder.setNegativeButton(getString(R.string.cancel), null);
- builder.setPositiveButton(getString(R.string.delete_messages), (dialog, which) -> {
+ builder.setPositiveButton(getString(R.string.confirm), (dialog, which) -> {
this.activity.xmppConnectionService.clearConversationHistory(conversation);
if (endConversationCheckBox.isChecked()) {
this.activity.xmppConnectionService.archiveConversation(conversation);
@@ -1882,12 +1882,19 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
refresh();
}
- private void deleteFile(Message message) {
- if (activity.xmppConnectionService.getFileBackend().deleteFile(message)) {
- message.setTransferable(new TransferablePlaceholder(Transferable.STATUS_DELETED));
- activity.onConversationsListItemUpdated();
- refresh();
- }
+ private void deleteFile(final Message message) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+ builder.setNegativeButton(R.string.cancel, null);
+ builder.setTitle(R.string.delete_file_dialog);
+ builder.setMessage(R.string.delete_file_dialog_msg);
+ builder.setPositiveButton(R.string.confirm, (dialog, which) -> {
+ if (activity.xmppConnectionService.getFileBackend().deleteFile(message)) {
+ message.setTransferable(new TransferablePlaceholder(Transferable.STATUS_DELETED));
+ activity.onConversationsListItemUpdated();
+ refresh();
+ }
+ });
+ builder.create().show();
}
public void resendMessage(final Message message) {