Skip to content

Commit a68ba83

Browse files
authored
Merge pull request #112 from code-payments/fix/home-bill-exit-cancel
fix(bill/exit): await for full settle before enabling cancel
2 parents 9806405 + 1de3721 commit a68ba83

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)