remove state-changing argument causing unnecessary recompositions

This commit is contained in:
Rohit Verma 2024-11-26 01:30:08 +05:30
parent dcd31f9671
commit 130158f510

View file

@ -257,7 +257,7 @@ fun Modifier.imageGridDragHandler(
autoScrollThreshold: Float,
setSelectedImageIds: (Set<Long>) -> Unit,
setAutoScrollSpeed: (Float) -> Unit,
) = pointerInput(autoScrollThreshold, setAutoScrollSpeed, setSelectedImageIds, imageList) {
) = pointerInput(autoScrollThreshold, setAutoScrollSpeed, imageList) {
fun imageIndexAtOffset(hitPoint: Offset): Int? =
gridState.layoutInfo.visibleItemsInfo.find { itemInfo ->