mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Prevent crash when trying to save conversation viewing position.
This commit is contained in:
committed by
Alex Hart
parent
b65d9ffaed
commit
815a988587
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user