mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed click on notification no going into conversation
This commit is contained in:
parent
a547a04258
commit
e1c1be3e50
1 changed files with 5 additions and 17 deletions
|
|
@ -370,23 +370,11 @@ class MainActivity : GenericActivity() {
|
|||
Log.i("$TAG New intent with [Chat] extra")
|
||||
if (isNewIntent) {
|
||||
try {
|
||||
val navGraphId = findNavController().graph.id
|
||||
if (navGraphId == R.navigation.main_nav_graph) {
|
||||
Log.i("$TAG Graph is already loaded, going to Conversations fragment")
|
||||
findNavController().navigate(
|
||||
R.id.action_global_conversationsListFragment,
|
||||
intent.extras
|
||||
)
|
||||
} else {
|
||||
Log.i(
|
||||
"$TAG Loading graph & set start destination to Conversations fragment instead of default"
|
||||
)
|
||||
val navGraph = findNavController().navInflater.inflate(
|
||||
R.navigation.main_nav_graph
|
||||
)
|
||||
navGraph.setStartDestination(R.id.conversationsListFragment)
|
||||
findNavController().setGraph(navGraph, intent.extras)
|
||||
}
|
||||
Log.i("$TAG Trying to go to Conversations fragment")
|
||||
findNavController().navigate(
|
||||
R.id.action_global_conversationsListFragment,
|
||||
intent.extras
|
||||
)
|
||||
} catch (ise: IllegalStateException) {
|
||||
Log.i(
|
||||
"$TAG Nav graph not set yet, loading it & set start destination to Conversations fragment instead of default"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue