mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix emoji crash
This commit is contained in:
parent
73c355fdf6
commit
513c08d39f
@ -465,7 +465,7 @@ private fun EmojiCategoriesContainer(
|
||||
val idx = categories.indexOf(activeCategoryItem)
|
||||
if(idx != -1) {
|
||||
val visibleSize = listState.layoutInfo.viewportEndOffset
|
||||
val itemWidth = listState.layoutInfo.visibleItemsInfo.first().size
|
||||
val itemWidth = listState.layoutInfo.visibleItemsInfo.firstOrNull()?.size ?: return@LaunchedEffect
|
||||
listState.animateScrollToItem(idx, itemWidth / 2 - visibleSize / 2)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user