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:
parent
f41233edc1
commit
6d70ec4994
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user