diff --git a/app/src/main/java/com/example/research/ui/settings/components/DictionaryListItem.kt b/app/src/main/java/com/example/research/ui/settings/components/DictionaryListItem.kt index 4a9d118..fa9bdd8 100644 --- a/app/src/main/java/com/example/research/ui/settings/components/DictionaryListItem.kt +++ b/app/src/main/java/com/example/research/ui/settings/components/DictionaryListItem.kt @@ -158,6 +158,7 @@ fun DictionaryListItem( val target = if (rawOffset <= -swipeThresholdPx) -maxSwipePx else 0f rawOffset = target scope.launch { + if (isDeleteBlockedCurrent()) return@launch offsetAnim.animateTo( target, animationSpec = spring(stiffness = Spring.StiffnessMedium) @@ -169,6 +170,7 @@ fun DictionaryListItem( val target = if (rawOffset <= -swipeThresholdPx) -maxSwipePx else 0f rawOffset = target scope.launch { + if (isDeleteBlockedCurrent()) return@launch offsetAnim.animateTo( target, animationSpec = spring(stiffness = Spring.StiffnessMedium) @@ -179,7 +181,10 @@ fun DictionaryListItem( if (isDeleteBlockedCurrent()) return@detectHorizontalDragGestures val newOffset = (rawOffset + dragAmount).coerceIn(-maxSwipePx, 0f) rawOffset = newOffset - scope.launch { offsetAnim.snapTo(newOffset) } + scope.launch { + if (isDeleteBlockedCurrent()) return@launch + offsetAnim.snapTo(newOffset) + } } ) },