|
|
@ -536,6 +536,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
float factor = detector.getScaleFactor();
|
|
|
|
float factor = detector.getScaleFactor();
|
|
|
|
float size = tvBody.getTextSize() * factor;
|
|
|
|
float size = tvBody.getTextSize() * factor;
|
|
|
|
float scale = (textSize == 0 ? 1.0f : size / (textSize * message_zoom / 100f));
|
|
|
|
float scale = (textSize == 0 ? 1.0f : size / (textSize * message_zoom / 100f));
|
|
|
|
|
|
|
|
boolean show_images = properties.getValue("images", message.id);
|
|
|
|
|
|
|
|
|
|
|
|
if (scale > 10)
|
|
|
|
if (scale > 10)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
@ -550,8 +552,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
int w = 0;
|
|
|
|
int w = 0;
|
|
|
|
int h = 0;
|
|
|
|
int h = 0;
|
|
|
|
if (img instanceof ImageSpanEx) {
|
|
|
|
if (img instanceof ImageSpanEx) {
|
|
|
|
w = ((ImageSpanEx) img).getWidth();
|
|
|
|
if (show_images) {
|
|
|
|
h = ((ImageSpanEx) img).getHeight();
|
|
|
|
w = ((ImageSpanEx) img).getWidth();
|
|
|
|
|
|
|
|
h = ((ImageSpanEx) img).getHeight();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
w = (zoom + 1) * 24;
|
|
|
|
|
|
|
|
h = w;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ImageHelper.fitDrawable(d, w, h, scale, tvBody);
|
|
|
|
ImageHelper.fitDrawable(d, w, h, scale, tvBody);
|
|
|
|
}
|
|
|
|
}
|
|
|
|