Skip to content

Commit 1de3721

Browse files
committed
fix(bill/exit): await for full settle before enabling cancel
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 9806405 commit 1de3721

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • app/src/main/java/com/getcode/view/main/home

app/src/main/java/com/getcode/view/main/home/HomeScan.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ private fun BillContainer(
459459

460460
LaunchedEffect(transition.isRunning, transition.targetState) {
461461
// wait for spring settle to enable cancel to not prematurely cancel
462-
// the enter. doing so causing the exit of the bill to not run
463-
if (transition.targetState == EnterExitState.Visible && !transition.isRunning) {
462+
// the enter. doing so causing the exit of the bill to not run, or run its own dismiss animation
463+
if (transition.targetState == EnterExitState.Visible && transition.currentState == transition.targetState) {
464464
delay(300)
465465
canCancel = true
466466
}

0 commit comments

Comments
 (0)