Prevent crash when trying to save conversation viewing position.
This commit is contained in:
parent
b65d9ffaed
commit
815a988587
1 changed files with 6 additions and 1 deletions
|
@ -595,7 +595,12 @@ public class ConversationAdapter
|
|||
}
|
||||
|
||||
public @Nullable ConversationMessage getLastVisibleConversationMessage(int position) {
|
||||
return getItem(position - ((hasFooter() && position == getItemCount() - 1) ? 1 : 0));
|
||||
try {
|
||||
return getItem(position - ((hasFooter() && position == getItemCount() - 1) ? 1 : 0));
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
Log.w(TAG, "Race condition changed size of conversation", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setMessageRequestAccepted(boolean messageRequestAccepted) {
|
||||
|
|
Loading…
Add table
Reference in a new issue