|
|
@ -1769,15 +1769,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
int line = layout.getLineForVertical(y);
|
|
|
|
int line = layout.getLineForVertical(y);
|
|
|
|
int off = layout.getOffsetForHorizontal(line, x);
|
|
|
|
int off = layout.getOffsetForHorizontal(line, x);
|
|
|
|
|
|
|
|
|
|
|
|
boolean show_images = properties.getValue("images", id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (show_images) {
|
|
|
|
|
|
|
|
ImageSpan[] image = buffer.getSpans(off, off, ImageSpan.class);
|
|
|
|
|
|
|
|
if (image.length > 0) {
|
|
|
|
|
|
|
|
onOpenImage(image[0].getDrawable(), image[0].getSource());
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
URLSpan[] link = buffer.getSpans(off, off, URLSpan.class);
|
|
|
|
URLSpan[] link = buffer.getSpans(off, off, URLSpan.class);
|
|
|
|
if (link.length > 0) {
|
|
|
|
if (link.length > 0) {
|
|
|
|
String url = link[0].getURL();
|
|
|
|
String url = link[0].getURL();
|
|
|
@ -1787,6 +1778,14 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
onOpenLink(uri);
|
|
|
|
onOpenLink(uri);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean show_images = properties.getValue("images", id);
|
|
|
|
|
|
|
|
if (show_images) {
|
|
|
|
|
|
|
|
ImageSpan[] image = buffer.getSpans(off, off, ImageSpan.class);
|
|
|
|
|
|
|
|
if (image.length > 0) {
|
|
|
|
|
|
|
|
onOpenImage(image[0].getDrawable(), image[0].getSource());
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|