mirror of
https://github.com/wismna/DoNext.git
synced 2025-12-06 00:02:40 -05:00
Fix undo after swiping issues
This commit is contained in:
@@ -53,12 +53,9 @@ fun TaskItemScreen(
|
|||||||
|
|
||||||
val dismissState = rememberSwipeToDismissBoxState(
|
val dismissState = rememberSwipeToDismissBoxState(
|
||||||
confirmValueChange = {
|
confirmValueChange = {
|
||||||
when (it) {
|
if (it == SwipeToDismissBoxValue.StartToEnd) onSwipeRight()
|
||||||
SwipeToDismissBoxValue.StartToEnd -> { onSwipeRight() }
|
else if (it == SwipeToDismissBoxValue.EndToStart) onSwipeLeft()
|
||||||
SwipeToDismissBoxValue.EndToStart -> { onSwipeLeft() }
|
return@rememberSwipeToDismissBoxState false
|
||||||
SwipeToDismissBoxValue.Settled -> return@rememberSwipeToDismissBoxState false
|
|
||||||
}
|
|
||||||
return@rememberSwipeToDismissBoxState true
|
|
||||||
},
|
},
|
||||||
// positional threshold of 25%
|
// positional threshold of 25%
|
||||||
positionalThreshold = { it * .25f }
|
positionalThreshold = { it * .25f }
|
||||||
|
|||||||
Reference in New Issue
Block a user