mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
0f9734c7bd
commit
5dbfd2bc8f
|
@ -1592,7 +1592,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
return;
|
return;
|
||||||
|
|
||||||
boolean has_images = args.getBoolean("has_images");
|
boolean has_images = args.getBoolean("has_images");
|
||||||
boolean show_images = properties.getValue("images", message.id);
|
|
||||||
|
|
||||||
if (result instanceof Spanned) {
|
if (result instanceof Spanned) {
|
||||||
tvBody.setText((Spanned) result);
|
tvBody.setText((Spanned) result);
|
||||||
|
@ -1601,7 +1600,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
tvBody.setMovementMethod(new TouchHandler(message));
|
tvBody.setMovementMethod(new TouchHandler(message));
|
||||||
} else if (result instanceof String)
|
} else if (result instanceof String)
|
||||||
((WebView) wvBody).loadDataWithBaseURL(null, (String) result, "text/html", "UTF-8", null);
|
((WebView) wvBody).loadDataWithBaseURL(null, (String) result, "text/html", "UTF-8", null);
|
||||||
else
|
else if (result == null) {
|
||||||
|
boolean show_full = args.getBoolean("show_full");
|
||||||
|
if (show_full)
|
||||||
|
((WebView) wvBody).loadDataWithBaseURL(null, "", "text/html", "UTF-8", null);
|
||||||
|
else
|
||||||
|
tvBody.setText(null);
|
||||||
|
} else
|
||||||
throw new IllegalStateException("Result=" + result);
|
throw new IllegalStateException("Result=" + result);
|
||||||
|
|
||||||
pbBody.setVisibility(View.GONE);
|
pbBody.setVisibility(View.GONE);
|
||||||
|
|
Loading…
Reference in New Issue