mirror of https://github.com/M66B/FairEmail.git
Show original without images
This commit is contained in:
parent
cfe8b4bd04
commit
f0b51a1edf
|
@ -1046,11 +1046,14 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
adapterImage.set(images);
|
adapterImage.set(images);
|
||||||
|
|
||||||
boolean show_html = properties.getValue("html", message.id);
|
boolean show_html = properties.getValue("html", message.id);
|
||||||
if (message.content && !show_html) {
|
if (message.content)
|
||||||
Bundle args = new Bundle();
|
if (show_html)
|
||||||
args.putSerializable("message", message);
|
onShowHtmlConfirmed(message);
|
||||||
bodyTask.execute(context, owner, args, "message:body");
|
else {
|
||||||
}
|
Bundle args = new Bundle();
|
||||||
|
args.putSerializable("message", message);
|
||||||
|
bodyTask.execute(context, owner, args, "message:body");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private TupleMessageEx getMessage() {
|
private TupleMessageEx getMessage() {
|
||||||
|
@ -1404,9 +1407,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
private void onShowHtmlConfirmed(final TupleMessageEx message) {
|
private void onShowHtmlConfirmed(final TupleMessageEx message) {
|
||||||
properties.setValue("html", message.id, true);
|
properties.setValue("html", message.id, true);
|
||||||
|
|
||||||
|
boolean show_images = properties.getValue("images", message.id);
|
||||||
|
|
||||||
btnHtml.setVisibility(View.GONE);
|
btnHtml.setVisibility(View.GONE);
|
||||||
ibQuotes.setVisibility(View.GONE);
|
ibQuotes.setVisibility(View.GONE);
|
||||||
ibImages.setVisibility(View.GONE);
|
ibImages.setVisibility(show_images ? View.GONE : View.VISIBLE);
|
||||||
tvBody.setVisibility(View.GONE);
|
tvBody.setVisibility(View.GONE);
|
||||||
rvImage.setVisibility(View.GONE);
|
rvImage.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
@ -1441,6 +1447,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
settings.setDisplayZoomControls(false);
|
settings.setDisplayZoomControls(false);
|
||||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||||
settings.setAllowFileAccess(false);
|
settings.setAllowFileAccess(false);
|
||||||
|
settings.setLoadsImagesAutomatically(show_images);
|
||||||
|
|
||||||
// Set default font
|
// Set default font
|
||||||
int px = Math.round(TypedValue.applyDimension(
|
int px = Math.round(TypedValue.applyDimension(
|
||||||
|
@ -1591,11 +1598,17 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
private void onShowImagesConfirmed(final TupleMessageEx message) {
|
private void onShowImagesConfirmed(final TupleMessageEx message) {
|
||||||
properties.setValue("images", message.id, true);
|
properties.setValue("images", message.id, true);
|
||||||
ibImages.setEnabled(false);
|
|
||||||
|
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putSerializable("message", message);
|
args.putSerializable("message", message);
|
||||||
bodyTask.execute(context, owner, args, "message:body");
|
|
||||||
|
boolean show_html = properties.getValue("html", message.id);
|
||||||
|
if (show_html)
|
||||||
|
onShowHtmlConfirmed(message);
|
||||||
|
else {
|
||||||
|
ibImages.setEnabled(false);
|
||||||
|
bodyTask.execute(context, owner, args, "message:body");
|
||||||
|
}
|
||||||
|
|
||||||
// Download inline images
|
// Download inline images
|
||||||
new SimpleTask<Void>() {
|
new SimpleTask<Void>() {
|
||||||
|
|
Loading…
Reference in New Issue