catch IllegalArgumentException

This commit is contained in:
Johan von Forstner
2021-01-17 14:08:28 +01:00
parent 0009895537
commit cb79f17c23

View File

@@ -224,7 +224,11 @@ class MapFragment : Fragment(), OnMapReadyCallback, MapsActivity.FragmentCallbac
)
if (!PreferenceDataSource(requireContext()).welcomeDialogShown) {
navController.navigate(R.id.action_map_to_welcome)
try {
navController.navigate(R.id.action_map_to_welcome)
} catch (ignored: IllegalArgumentException) {
// when there is already another navigation going on
}
}
}