|
|
|
@ -1779,12 +1779,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
boolean show_images = properties.getValue("images", id);
|
|
|
|
|
if (show_images) {
|
|
|
|
|
ImageSpan[] image = buffer.getSpans(off, off, ImageSpan.class);
|
|
|
|
|
if (image.length > 0 && image[0].getSource() != null) {
|
|
|
|
|
onOpenImage(image[0].getDrawable(), image[0].getSource());
|
|
|
|
|
ImageSpan[] image = buffer.getSpans(off, off, ImageSpan.class);
|
|
|
|
|
if (image.length > 0 && image[0].getSource() != null) {
|
|
|
|
|
boolean show_images = properties.getValue("images", id);
|
|
|
|
|
if (show_images) {
|
|
|
|
|
onOpenImage(image[0].getDrawable());
|
|
|
|
|
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);
|
|
|
|
|
pv.setImageDrawable(drawable);
|
|
|
|
|
|
|
|
|
|