mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-08 22:48:34 +00:00
Fix potention OOB error when pulse-highlighting a message.
This basically happened if you used full-text search to search for the latest message in a conversation, but when you navigated there, it *also* had a header set (like a typing indicator or unknownSenderView).
This commit is contained in:
parent
1b2f964f32
commit
a0b4065be3
@ -358,8 +358,10 @@ public class ConversationAdapter<V extends View & BindableConversationItem>
|
||||
*/
|
||||
void pulseHighlightItem(int position) {
|
||||
if (position >= 0 && position < getItemCount()) {
|
||||
recordToPulseHighlight = getItem(position);
|
||||
notifyItemChanged(position);
|
||||
int correctedPosition = isHeaderPosition(position) ? position + 1 : position;
|
||||
|
||||
recordToPulseHighlight = getItem(correctedPosition);
|
||||
notifyItemChanged(correctedPosition);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user