mirror of https://github.com/M66B/FairEmail.git
Show link of not shown images
This commit is contained in:
parent
7e8895a368
commit
7e72cea9ac
|
@ -1779,12 +1779,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean show_images = properties.getValue("images", id);
|
|
||||||
if (show_images) {
|
|
||||||
ImageSpan[] image = buffer.getSpans(off, off, ImageSpan.class);
|
ImageSpan[] image = buffer.getSpans(off, off, ImageSpan.class);
|
||||||
if (image.length > 0 && image[0].getSource() != null) {
|
if (image.length > 0 && image[0].getSource() != null) {
|
||||||
onOpenImage(image[0].getDrawable(), image[0].getSource());
|
boolean show_images = properties.getValue("images", id);
|
||||||
|
if (show_images) {
|
||||||
|
onOpenImage(image[0].getDrawable());
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
Uri uri = Uri.parse(image[0].getSource());
|
||||||
|
if ("http".equals(uri.getScheme()) || "https".equals(uri.getScheme())) {
|
||||||
|
onOpenLink(uri);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1905,7 +1911,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onOpenImage(Drawable drawable, String source) {
|
private void onOpenImage(Drawable drawable) {
|
||||||
PhotoView pv = new PhotoView(context);
|
PhotoView pv = new PhotoView(context);
|
||||||
pv.setImageDrawable(drawable);
|
pv.setImageDrawable(drawable);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue