mirror of https://github.com/M66B/FairEmail.git
Use inline image viewer for unlinked images only
This commit is contained in:
parent
aa463b3701
commit
8543f43c0f
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue