Moved attachments cache

This commit is contained in:
M66B
2019-04-04 14:47:56 +02:00
parent 6a2191a35c
commit d44e8b4a57
2 changed files with 17 additions and 4 deletions

View File

@@ -161,6 +161,7 @@ public class FragmentMessages extends FragmentBase {
private Map<String, List<Long>> values = new HashMap<>();
private Map<Long, Spanned> bodies = new HashMap<>();
private Map<Long, String> html = new HashMap<>();
private LongSparseArray<List<EntityAttachment>> attachments = new LongSparseArray<>();
private LongSparseArray<TupleAccountSwipes> accountSwipes = new LongSparseArray<>();
private BoundaryCallbackMessages boundaryCallback = null;
@@ -713,6 +714,16 @@ public class FragmentMessages extends FragmentBase {
return html.get(id);
}
@Override
public void setAttchments(long id, List<EntityAttachment> list) {
attachments.put(id, list);
}
@Override
public List<EntityAttachment> getAttachments(long id) {
return attachments.get(id);
}
@Override
public void scrollTo(final int pos, final int dy) {
new Handler().post(new Runnable() {