Fix some crashes

This commit is contained in:
0xd9a 2022-05-25 19:06:31 +05:30
parent 57b5fb6f8c
commit 6c31f1f4a6
1 changed files with 3 additions and 3 deletions

View File

@ -76,9 +76,9 @@ class RecyclerViewThreadLines(context: Context, private val lineInfoList: List<L
var lineBottom = view.bottom.toFloat() - view.height / 2
// if below status has a full line for current level, extend the line to the bottom
if (i < childCount - 1) {
if (i < lineInfoList.lastIndex - 1) {
val nextLineInfo = lineInfoList[i + 1]
if (i < lineInfoList.lastIndex - 1) {
val nextLineInfo = lineInfoList[i + 1]
if (level >= nextLineInfo.fullLinesStart && level <= nextLineInfo.fullLinesEnd) {
lineBottom = view.bottom.toFloat()
}
}