Fixup HistoryScreen item swipeToDismiss

This commit is contained in:
tarsin committed 2023-01-23 18:47:04 +08:00
1 parent fcea40685c
commit 51a12ee5cb
1 file changed
+4 -7
@@ -118,14 +118,11 @@ fun HistoryScreen(hostFragment: HistoryComposeScreenFragmentBridge) {
key = { item -> item.gid }
) { info ->
info?.let {
val dismissState = rememberDismissState(
confirmValueChange = {
coroutineScope.launchIO {
EhDB.deleteHistoryInfo(info)
}
true
val dismissState = rememberDismissState()
if (dismissState.isDismissed(DismissDirection.EndToStart))
coroutineScope.launchIO {
EhDB.deleteHistoryInfo(info)
}
)
SwipeToDismiss(
state = dismissState,
background = {},