Skip to content

Commit 793bd6f

Browse files
committed
Fix strange animations when quickly reording items
1 parent 4d4fe70 commit 793bd6f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/src/main/java/org/schabi/newpipe/ui/components/menu/LongPressMenuEditor.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,12 @@ fun LongPressMenuEditor(modifier: Modifier = Modifier) {
427427
ItemInListUi(
428428
item = item,
429429
selected = currentlyFocusedItem == i,
430-
modifier = Modifier.animateItem()
430+
// We only want placement animations: fade in/out animations interfere with
431+
// items being replaced by a drag marker while being dragged around, and a fade
432+
// in/out animation there does not make sense as the item was just "picked up".
433+
// Furthermore there are strange moving animation artifacts when moving and
434+
// releasing items quickly before their fade-out animation finishes.
435+
modifier = Modifier.animateItem(fadeInSpec = null, fadeOutSpec = null)
431436
)
432437
}
433438
}

0 commit comments

Comments
 (0)