1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-08 12:02:33 +01:00

Handle cancelled dragging

This commit is contained in:
Allan Wang 2023-06-21 23:37:12 -07:00
parent f41233edc1
commit 6d70ec4994
No known key found for this signature in database
GPG Key ID: C93E3F9C679D7A56

View File

@ -107,6 +107,12 @@ private fun <T> Modifier.dragTarget(dragTargetState: DragTargetState<T>): Modifi
dragTargetState.isDragging = false
}
},
onDragCancel = {
if (dragTargetState.isDragging) {
draggableState.onDragEnd(key)
dragTargetState.isDragging = false
}
}
)
}
// We still need to draw to track size changes