Skip to content

Commit

Permalink
Reset purchase state when automatically leaving a screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Nov 21, 2023
1 parent e98cece commit 8b89cf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ class OutOfTimeViewModel(
val tomorrow = DateTime.now().plusHours(20)

if (expiry.isAfter(tomorrow)) {
// Reset purchase state
paymentUseCase.resetPurchaseResult()
_uiSideEffect.tryEmit(UiSideEffect.OpenConnectScreen)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ class WelcomeViewModel(
val tomorrow = DateTime.now().plusHours(20)

if (expiry.isAfter(tomorrow)) {
// Reset purchase state
paymentUseCase.resetPurchaseResult()
_uiSideEffect.tryEmit(UiSideEffect.OpenConnectScreen)
}
}
Expand Down

0 comments on commit 8b89cf3

Please sign in to comment.