Simplification

This commit is contained in:
M66B 2019-05-03 17:27:29 +02:00
parent 13c16bb7ac
commit a7266739c2
2 changed files with 2 additions and 4 deletions

View File

@ -1762,8 +1762,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
public Drawable getDrawable(String source) {
Drawable image = HtmlHelper.decodeImage(source, message.id, show_images, tvBody);
float width = context.getResources().getDisplayMetrics().widthPixels -
Helper.dp2pixels(context, 12); // margins
float width = tvBody.getWidth();
if (image.getIntrinsicWidth() > width) {
float scale = width / image.getIntrinsicWidth();
image.setBounds(0, 0,

View File

@ -2762,8 +2762,7 @@ public class FragmentCompose extends FragmentBase {
public Drawable getDrawable(String source) {
Drawable image = HtmlHelper.decodeImage(source, id, show_images, tvReference);
float width = context.getResources().getDisplayMetrics().widthPixels -
Helper.dp2pixels(context, 12); // margins;
float width = tvReference.getWidth();
if (image.getIntrinsicWidth() > width) {
float scale = width / image.getIntrinsicWidth();
image.setBounds(0, 0,