@@ -84,8 +84,8 @@ fun TodoListItem(
8484) {
8585 val swipeToDismissBoxState = rememberSwipeToDismissBoxState(
8686 confirmValueChange = {
87- if (it == StartToEnd ) onToggleDone(todoItem)
88- else if (it == EndToStart ) onRemove(todoItem)
87+ if (it == StartToEnd ) onToggleDone(todoItem)
88+ else if (it == EndToStart ) onRemove(todoItem)
8989 // Reset item when toggling done status
9090 it != StartToEnd
9191 }
@@ -95,10 +95,10 @@ fun TodoListItem(
9595 state = swipeToDismissBoxState,
9696 modifier = modifier.fillMaxSize(),
9797 backgroundContent = {
98- when (swipeToDismissBoxState.dismissDirection) {
98+ when (swipeToDismissBoxState.dismissDirection) {
9999 StartToEnd -> {
100100 Icon (
101- if (todoItem.isItemDone) Icons .Default .CheckBox else Icons .Default .CheckBoxOutlineBlank ,
101+ if (todoItem.isItemDone) Icons .Default .CheckBox else Icons .Default .CheckBoxOutlineBlank ,
102102 contentDescription = if (todoItem.isItemDone) " Done" else " Not done" ,
103103 modifier = Modifier
104104 .fillMaxSize()
@@ -173,8 +173,8 @@ fun TodoListItemWithAnimation(
173173) {
174174 val swipeToDismissBoxState = rememberSwipeToDismissBoxState(
175175 confirmValueChange = {
176- if (it == StartToEnd ) onToggleDone(todoItem)
177- else if (it == EndToStart ) onRemove(todoItem)
176+ if (it == StartToEnd ) onToggleDone(todoItem)
177+ else if (it == EndToStart ) onRemove(todoItem)
178178 // Reset item when toggling done status
179179 it != StartToEnd
180180 }
@@ -184,10 +184,10 @@ fun TodoListItemWithAnimation(
184184 state = swipeToDismissBoxState,
185185 modifier = modifier.fillMaxSize(),
186186 backgroundContent = {
187- when (swipeToDismissBoxState.dismissDirection) {
187+ when (swipeToDismissBoxState.dismissDirection) {
188188 StartToEnd -> {
189189 Icon (
190- if (todoItem.isItemDone) Icons .Default .CheckBox else Icons .Default .CheckBoxOutlineBlank ,
190+ if (todoItem.isItemDone) Icons .Default .CheckBox else Icons .Default .CheckBoxOutlineBlank ,
191191 contentDescription = if (todoItem.isItemDone) " Done" else " Not done" ,
192192 modifier = Modifier
193193 .fillMaxSize()
0 commit comments