Fix possible NPE in ConversationListAdapter.

This commit is contained in:
Greyson Parrelli
2021-02-25 09:29:25 -05:00
parent 5e106bf510
commit 9d3cebf430

View File

@@ -175,6 +175,10 @@ class ConversationListAdapter extends ListAdapter<Conversation, RecyclerView.Vie
public long getItemId(int position) {
Conversation item = getItem(position);
if (item == null) {
return 0;
}
switch (item.getType()) {
case THREAD: return item.getThreadRecord().getThreadId();
case PINNED_HEADER: return -1;