Fix strange animations when quickly reording items

This commit is contained in:
Stypox 2026-01-06 17:47:31 +01:00
parent cf4bfa522e
commit 4d8cdc4681
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -427,7 +427,12 @@ fun LongPressMenuEditor(modifier: Modifier = Modifier) {
ItemInListUi(
item = item,
selected = currentlyFocusedItem == i,
modifier = Modifier.animateItem()
// We only want placement animations: fade in/out animations interfere with
// items being replaced by a drag marker while being dragged around, and a fade
// in/out animation there does not make sense as the item was just "picked up".
// Furthermore there are strange moving animation artifacts when moving and
// releasing items quickly before their fade-out animation finishes.
modifier = Modifier.animateItem(fadeInSpec = null, fadeOutSpec = null)
)
}
}