Fix crash with conversations with "uknown contact" header.

We weren't accounting for ConversationAdapter header position when
getting the next and previous record in a conversation.
This commit is contained in:
Greyson Parrelli
2018-07-20 17:50:54 -07:00
parent 6a090bd5f1
commit a4214300ec
2 changed files with 13 additions and 4 deletions

View File

@@ -211,6 +211,13 @@ public abstract class CursorRecyclerViewAdapter<VH extends RecyclerView.ViewHold
return position - getFastAccessSize();
}
protected int getRawCursorPosition(int position) {
if (hasHeaderView()) {
position += 1;
}
return position;
}
protected int getFastAccessItemViewType(int position) {
return 0;
}