Improved navigation to home screen

This commit is contained in:
Juha Heinanen
2026-05-13 09:50:02 +03:00
parent f3a2998bea
commit b7bd1181e0
2 changed files with 5 additions and 1 deletions

View File

@ -260,7 +260,9 @@ class MainActivity : ComponentActivity() {
navController.navigate(route)
}
is NavigationCommand.NavigateToHome -> {
navController.navigate("main")
navController.navigate("main") {
popUpTo("main") { inclusive = true }
}
}
}
}

View File

@ -2603,6 +2603,7 @@ fun handleIntent(ctx: Context, viewModel: ViewModel, intent: Intent, action: Str
Log.w(TAG, "handleIntent 'call' did not find ua $uap")
return
}
viewModel.navigateToHome()
viewModel.dialerState.callUri.value = intent.getStringExtra("peer")!!
spinToAor(viewModel, ua.account.aor)
if (ev[0] == "call") {
@ -2617,6 +2618,7 @@ fun handleIntent(ctx: Context, viewModel: ViewModel, intent: Intent, action: Str
Log.w(TAG, "handleIntent '$action' did not find call $callp")
return
}
viewModel.navigateToHome()
val ua = call.ua
spinToAor(viewModel, ua.account.aor, call)
if (ev[0] == "call answer")