Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose Navigation: start migration with AccountsActivity #1211

Open
wants to merge 21 commits into
base: main-ose
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Solve navigation issue
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
ArnyminerZ committed Jan 20, 2025
commit 85c8bb0e3032767219a69f916684320266be6710
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ import android.net.Uri
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.navigation.NavDeepLinkRequest
import androidx.navigation.NavOptions
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
@@ -23,7 +24,10 @@ fun Navigation(deepLinkUri: Uri?, logger: Logger) {
if (deepLinkUri != null) {
val deepLinkRq = NavDeepLinkRequest.Builder.fromUri(deepLinkUri).build()
logger.info("Got deep link: $deepLinkUri → $deepLinkRq")
navController.navigate(deepLinkRq)
navController.navigate(
deepLinkRq,
NavOptions.Builder().setLaunchSingleTop(true).build()
)
}
}