Confirm showing original message

pull/146/head
M66B 6 years ago
parent 4cd719b5dc
commit ef54df79bc

@ -525,13 +525,9 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
else if (viewType == ViewType.THREAD) {
if (view.getId() == R.id.ivExpanderAddress)
onToggleAddresses(pos, message);
else if (view.getId() == R.id.btnHtml) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast(
new Intent(ActivityView.ACTION_VIEW_FULL)
.putExtra("id", message.id)
.putExtra("from", MessageHelper.getFormattedAddresses(message.from, true)));
} else if (view.getId() == R.id.btnImages)
else if (view.getId() == R.id.btnHtml)
onShowHtml(message);
else if (view.getId() == R.id.btnImages)
onShowImages(message);
else
onToggleMessage(pos, message);
@ -611,6 +607,23 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
notifyItemChanged(pos);
}
private void onShowHtml(final EntityMessage message) {
new DialogBuilderLifecycle(context, owner)
.setMessage(R.string.title_ask_show_html)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast(
new Intent(ActivityView.ACTION_VIEW_FULL)
.putExtra("id", message.id)
.putExtra("from", MessageHelper.getFormattedAddresses(message.from, true)));
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
private void onShowImages(EntityMessage message) {
properties.setImages(message.id, true);
btnImages.setEnabled(false);

@ -223,6 +223,7 @@
<string name="title_ask_delete_answer">Delete reply template permanently?</string>
<string name="title_ask_discard">Discard draft?</string>
<string name="title_ask_spam">Report message as spam?</string>
<string name="title_ask_show_html">Showing the original message can leak privacy sensitive information</string>
<string name="title_fix">Fix</string>
<string name="title_compose">Compose %1$s</string>

Loading…
Cancel
Save