File tree Expand file tree Collapse file tree
apps/flipcash/features/scanner/src/main/kotlin/com/flipcash/app/scanner/internal
ui/navigation/src/main/kotlin/com/getcode/navigation/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,7 +117,9 @@ internal fun Scanner() {
117117 if (deeplink != null ) {
118118 vibrator.vibrate(duration = 50 )
119119 when (deeplink) {
120- is DeeplinkType .CashLink -> session.openCashLink(deeplink.entropy)
120+ is DeeplinkType .CashLink -> {
121+ session.openCashLink(deeplink.entropy)
122+ }
121123 is DeeplinkType .Navigatable -> {
122124 val routes = when (deeplink) {
123125 is DeeplinkType .TokenInfo -> listOf (
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import androidx.compose.runtime.snapshots.Snapshot
1111import androidx.compose.runtime.staticCompositionLocalOf
1212import androidx.navigation3.runtime.NavBackStack
1313import androidx.navigation3.runtime.NavKey
14+ import com.getcode.navigation.Sheet
1415import com.getcode.navigation.results.NavResultStateRegistry
1516import com.getcode.navigation.results.NavResultStore
1617import com.getcode.navigation.results.NavResultStoreImpl
@@ -207,7 +208,13 @@ data class CodeNavigator(
207208 }
208209
209210 /* * Hide/dismiss a sheet (pops the current route). */
210- fun hide () = onRootReached()
211+ fun hide () {
212+ val isSheetOpen = backStack.any { it is Sheet }
213+ if (isSheetOpen) {
214+ navigateBack()
215+ }
216+ onRootReached()
217+ }
211218
212219 /* * Replace the current route with a new one. */
213220 fun replace (route : NavKey ) = navigate(route, NavOptions (popUpTo = NavOptions .PopUpTo .PopLast ))
You can’t perform that action at this time.
0 commit comments