mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-17 21:31:57 +01:00
Fully removing the swipe to delete from right to left.
This commit is contained in:
parent
626daa9967
commit
e8462fe67f
@ -56,7 +56,6 @@ import com.vitorpamplona.amethyst.ui.stringRes
|
||||
fun SwipeToDeleteContainer(
|
||||
modifier: Modifier = Modifier,
|
||||
onStartToEnd: () -> Unit,
|
||||
onEndToStart: () -> Unit,
|
||||
content: @Composable (RowScope.() -> Unit),
|
||||
) {
|
||||
val dismissState =
|
||||
@ -66,9 +65,7 @@ fun SwipeToDeleteContainer(
|
||||
StartToEnd -> {
|
||||
onStartToEnd()
|
||||
}
|
||||
EndToStart -> {
|
||||
onEndToStart()
|
||||
}
|
||||
EndToStart -> return@rememberSwipeToDismissBoxState false
|
||||
Settled -> return@rememberSwipeToDismissBoxState false
|
||||
}
|
||||
return@rememberSwipeToDismissBoxState true
|
||||
@ -80,6 +77,7 @@ fun SwipeToDeleteContainer(
|
||||
state = dismissState,
|
||||
modifier = modifier,
|
||||
backgroundContent = { DismissBackground(dismissState) },
|
||||
enableDismissFromEndToStart = false,
|
||||
content = content,
|
||||
)
|
||||
}
|
||||
|
@ -210,7 +210,6 @@ private fun DraftFeedLoaded(
|
||||
.fillMaxWidth()
|
||||
.animateContentSize(),
|
||||
onStartToEnd = { accountViewModel.delete(item) },
|
||||
onEndToStart = { },
|
||||
) {
|
||||
NoteCompose(
|
||||
item,
|
||||
|
Loading…
x
Reference in New Issue
Block a user