Hello,
I'm using androidx.navigation:navigation-*:2.7.5 and noticed a potential issue with NavController#onGraphCreated not being called when calling setGraph twice. This seems to be related to the commit found here:
https://android.googlesource.com/platform/frameworks/support/+/d22366d59a46aa16aa79d1d691cd5cb55f56c378
I'm trying to find a way to force NavController#onGraphCreated to be called in this scenario.
Here's why I need this:
I have an Activity with launchMode set to singleTop.
• When the Activity is started for the first time, onCreate is called and NavController#setGraph is used to set the initial graph.
• When the Activity is started again (via startActivity), onNewIntent is called. Inside onNewIntent, I call NavController#setGraph again to update the UI.
This worked fine in 2.7.4, but in 2.7.5, the UI no longer updates when calling setGraph in onNewIntent.
Is there any way to force NavController#onGraphCreated to be called in this situation?
Any help would be greatly appreciated.