Ask to delete local messages

pull/153/head
M66B 6 years ago
parent 935952c036
commit f6fde69b4a

@ -343,7 +343,17 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
}.execute(context, owner, args, "folder:sync");
}
private void OnActionDeleteLocal(boolean browsed) {
private void OnActionDeleteLocal(final boolean browsed) {
View dview = LayoutInflater.from(context).inflate(R.layout.dialog_message, null);
TextView tvMessage = dview.findViewById(R.id.tvMessage);
tvMessage.setText(context.getText(R.string.title_ask_delete_local));
new DialogBuilderLifecycle(context, owner)
.setView(dview)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Bundle args = new Bundle();
args.putLong("id", folder.id);
args.putBoolean("browsed", browsed);
@ -367,6 +377,10 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
}
}.execute(context, owner, args, "folder:delete:local");
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
private void onActionEmptyTrash() {
new DialogBuilderLifecycle(context, owner)

@ -373,6 +373,7 @@
<string name="title_ask_show_html">Showing the original message can leak privacy sensitive information</string>
<string name="title_ask_show_image">Showing images can leak privacy sensitive information</string>
<string name="title_ask_edit_ref">Edit reformatted replied/forwarded message text?</string>
<string name="title_ask_delete_local">Delete local messages which are stored on the remote server too?</string>
<string name="title_compose">Compose</string>
<string name="title_from">From:</string>

Loading…
Cancel
Save