mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Prevent crash
This commit is contained in:
parent
8b1ff7af2b
commit
3e845f45f7
2 changed files with 10 additions and 5 deletions
|
|
@ -73,7 +73,7 @@ class ContactsManager @UiThread constructor() {
|
|||
)
|
||||
|
||||
// TODO FIXME: doesn't work if a SIP address wasn't added to unknownContactsAvatarsMap yet
|
||||
// For example if it was displayed so far in any list
|
||||
// For example if it wasn't displayed so far in any list
|
||||
var atLeastSomeoneNew = false
|
||||
if (unknownContactsAvatarsMap.isNotEmpty()) {
|
||||
for (friend in friends) {
|
||||
|
|
|
|||
|
|
@ -405,10 +405,15 @@ class MainActivity : GenericActivity() {
|
|||
}
|
||||
} else {
|
||||
if (!isNewIntent && defaultDestination > 0) {
|
||||
Log.i("$TAG Setting nav graph with expected start destination")
|
||||
val navGraph = findNavController().navInflater.inflate(R.navigation.main_nav_graph)
|
||||
navGraph.setStartDestination(defaultDestination)
|
||||
findNavController().setGraph(navGraph, null)
|
||||
try {
|
||||
Log.i("$TAG Setting nav graph with expected start destination")
|
||||
val navGraph =
|
||||
findNavController().navInflater.inflate(R.navigation.main_nav_graph)
|
||||
navGraph.setStartDestination(defaultDestination)
|
||||
findNavController().setGraph(navGraph, null)
|
||||
} catch (ise: IllegalStateException) {
|
||||
Log.i("$TAG Failed to handle intent: $ise")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue