Skip to content

Commit fbd1cdf

Browse files
committed
Fix camera showing up twice in back stack
1 parent 8b10874 commit fbd1cdf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/src/main/kotlin/com/darkrockstudios/app/securecamera/auth/PinVerificationContent.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fun PinVerificationContent(
101101
pin = pin,
102102
returnKey = returnKey,
103103
onNavigate = { destKey ->
104-
navController.navigateFromBase(Camera, destKey)
104+
navController.navigateFromBase(Camera, destKey, launchSingleTop = true)
105105
},
106106
onFailure = { pin = "" }
107107
)

app/src/main/kotlin/com/darkrockstudios/app/securecamera/auth/PinVerificationViewModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ class PinVerificationViewModel(
125125
onNavigate(returnKey)
126126
}
127127
} else {
128-
val newFailedAttempts = authRepository.getFailedAttempts()
129-
val remainingBackoff = authRepository.calculateRemainingBackoffSeconds()
128+
val newFailedAttempts = authRepository.getFailedAttempts()
129+
val remainingBackoff = authRepository.calculateRemainingBackoffSeconds()
130130
val isBackoffActive = remainingBackoff > 0
131131

132132
withContext(Dispatchers.Main) {

0 commit comments

Comments
 (0)