prevent out of range

pull/184/head
M66B 5 years ago
parent dc5a15a8bd
commit 9d2ab7c2e9

@ -320,7 +320,9 @@ public class ViewModelMessages extends ViewModel {
for (int j = 0; j < messages.size(); j++) for (int j = 0; j < messages.size(); j++)
if (messages.get(j).id == id) { if (messages.get(j).id == id) {
int pos = i + j; int pos = i + j;
model.list.getValue().loadAround(pos);
if (pos < plist.size())
plist.loadAround(pos);
List<TupleMessageEx> lprev = null; List<TupleMessageEx> lprev = null;
if (pos - 1 >= 0) if (pos - 1 >= 0)

Loading…
Cancel
Save