Prevent crash

pull/146/head
M66B 6 years ago
parent 01feac6a48
commit 6cb02410b6

@ -615,7 +615,9 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
int px = (int) (24 * scale + 0.5f);
if (source != null && source.startsWith("cid")) {
String cid = "<" + source.split(":")[1] + ">";
String[] cids = source.split(":");
if (cids.length > 1) {
String cid = "<" + cids[1] + ">";
EntityAttachment attachment = DB.getInstance(context).attachment().getAttachment(message.id, cid);
if (attachment == null || !attachment.available) {
Drawable d = context.getResources().getDrawable(R.drawable.baseline_warning_24, context.getTheme());
@ -632,6 +634,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
return d;
}
}
}
if (properties.showImages(message.id)) {
// Get cache folder

Loading…
Cancel
Save