Fixed reload body on inline images

pull/178/head
M66B 5 years ago
parent fa7ac2aa6a
commit 3425a45e20

@ -1813,6 +1813,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
DB db = DB.getInstance(context); DB db = DB.getInstance(context);
List<EntityAttachment> attachments = db.attachment().getAttachments(message.id); List<EntityAttachment> attachments = db.attachment().getAttachments(message.id);
properties.setAttachments(message.id, attachments);
boolean signed_data = false; boolean signed_data = false;
for (EntityAttachment attachment : attachments) for (EntityAttachment attachment : attachments)

@ -289,13 +289,14 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
private Long closeId = null; private Long closeId = null;
private int autoCloseCount = 0; private int autoCloseCount = 0;
private boolean autoExpanded = true; private boolean autoExpanded = true;
private Map<String, String> kv = new HashMap<>();
private Map<String, List<Long>> values = new HashMap<>(); final private Map<String, String> kv = new HashMap<>();
private LongSparseArray<Float> sizes = new LongSparseArray<>(); final private Map<String, List<Long>> values = new HashMap<>();
private LongSparseArray<Integer> heights = new LongSparseArray<>(); final private LongSparseArray<Float> sizes = new LongSparseArray<>();
private LongSparseArray<Pair<Integer, Integer>> positions = new LongSparseArray<>(); final private LongSparseArray<Integer> heights = new LongSparseArray<>();
private LongSparseArray<List<EntityAttachment>> attachments = new LongSparseArray<>(); final private LongSparseArray<Pair<Integer, Integer>> positions = new LongSparseArray<>();
private LongSparseArray<TupleAccountSwipes> accountSwipes = new LongSparseArray<>(); final private LongSparseArray<List<EntityAttachment>> attachments = new LongSparseArray<>();
final private LongSparseArray<TupleAccountSwipes> accountSwipes = new LongSparseArray<>();
private NumberFormat NF = NumberFormat.getNumberInstance(); private NumberFormat NF = NumberFormat.getNumberInstance();
@ -1531,12 +1532,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override @Override
public void setAttachments(long id, List<EntityAttachment> list) { public void setAttachments(long id, List<EntityAttachment> list) {
attachments.put(id, list); synchronized (attachments) {
attachments.put(id, list);
}
} }
@Override @Override
public List<EntityAttachment> getAttachments(long id) { public List<EntityAttachment> getAttachments(long id) {
return attachments.get(id); synchronized (attachments) {
return attachments.get(id);
}
} }
public void scrollTo(final int pos, final int y) { public void scrollTo(final int pos, final int y) {

Loading…
Cancel
Save