Skip to content

Commit

Permalink
Fix possible NPE in ConversationListAdapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Feb 25, 2021
1 parent 5e106bf commit 9d3cebf
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -175,6 +175,10 @@ protected Conversation getItem(int position) {
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;
Expand Down

0 comments on commit 9d3cebf

Please sign in to comment.