This commit is contained in:
M66B 2019-05-03 09:41:50 +02:00
parent 9f306c52d5
commit 39aa3512f5
1 changed files with 1 additions and 3 deletions

View File

@ -1759,6 +1759,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (!show_quotes) { if (!show_quotes) {
final int px = Helper.dp2pixels(context, 24 + (zoom) * 8); final int px = Helper.dp2pixels(context, 24 + (zoom) * 8);
StyledQuoteSpan[] squotes = builder.getSpans(0, builder.length(), StyledQuoteSpan.class); StyledQuoteSpan[] squotes = builder.getSpans(0, builder.length(), StyledQuoteSpan.class);
for (StyledQuoteSpan squote : squotes) for (StyledQuoteSpan squote : squotes)
builder.setSpan(new DynamicDrawableSpan() { builder.setSpan(new DynamicDrawableSpan() {
@ -1775,7 +1776,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
builder.getSpanFlags(squote)); builder.getSpanFlags(squote));
} }
args.putBoolean("has_quotes", builder.getSpans(0, body.length(), StyledQuoteSpan.class).length > 0);
args.putBoolean("has_images", builder.getSpans(0, body.length(), ImageSpan.class).length > 0); args.putBoolean("has_images", builder.getSpans(0, body.length(), ImageSpan.class).length > 0);
return builder; return builder;
@ -1794,9 +1794,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (!show_expanded) if (!show_expanded)
return; return;
boolean has_quotes = args.getBoolean("has_quotes");
boolean has_images = args.getBoolean("has_images"); boolean has_images = args.getBoolean("has_images");
boolean show_quotes = properties.getValue("quotes", message.id);
boolean show_images = properties.getValue("images", message.id); boolean show_images = properties.getValue("images", message.id);
tbHtml.setVisibility(hasWebView ? View.VISIBLE : View.GONE); tbHtml.setVisibility(hasWebView ? View.VISIBLE : View.GONE);