Fixes inability to go back after opening a nostr link from the web into Amethyst

This commit is contained in:
Vitor Pamplona 2024-09-18 19:47:09 -04:00
parent 97b88c7ceb
commit d0633d07fa
2 changed files with 4 additions and 4 deletions

View File

@ -344,11 +344,11 @@ private fun NavigateIfIntentRequested(
val scope = rememberCoroutineScope()
DisposableEffect(activity) {
DisposableEffect(nav, activity) {
val consumer =
Consumer<Intent> { intent ->
val uri = intent?.data?.toString()
if (!uri.isNullOrBlank()) {
val uri = intent.data.toString()
if (uri.isNotBlank()) {
// navigation functions
val newPage = uriToRoute(uri)

View File

@ -111,7 +111,7 @@ class Nav(
upTo: String,
) {
scope.launch {
controller.navigate(route) { popUpTo(route) { inclusive = true } }
controller.navigate(route) { popUpTo(upTo) { inclusive = true } }
}
}
}