Prevent crash

pull/146/head
M66B 6 years ago
parent b5c7cea122
commit c1a52e91bb

@ -1523,6 +1523,12 @@ public class FragmentMessages extends FragmentEx {
model.setMessages(messages); model.setMessages(messages);
} }
if (selectionTracker != null) {
PagedList<TupleMessageEx> current = adapter.getCurrentList();
if (messages.size() != (current == null ? 0 : current.size()))
selectionTracker.clearSelection();
}
Log.i(Helper.TAG, "Submit messages=" + messages.size()); Log.i(Helper.TAG, "Submit messages=" + messages.size());
adapter.submitList(messages); adapter.submitList(messages);

Loading…
Cancel
Save