mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-02 07:23:38 +00:00
Fix crash in hasHeader via range check.
This commit is contained in:
@@ -93,7 +93,11 @@ class ConversationItemDecorations(hasWallpaper: Boolean = false, private val sch
|
||||
}
|
||||
|
||||
private fun hasHeader(position: Int): Boolean {
|
||||
val model = currentItems[position]
|
||||
val model = if (position in currentItems.indices) {
|
||||
currentItems[position]
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
if (model == null || model !is ConversationMessageElement) {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user