[fenix] For https://github.com/mozilla-mobile/fenix/issues/27450 Fix Crash from Navigation action/destination org.mozilla.firefox:id/action_savedLoginsAuthFragment_to_loginsListFragment

pull/600/head
iorgamgabriel 2 years ago committed by mergify[bot]
parent 6ea094b8e0
commit 2dca91e984

@ -224,10 +224,12 @@ class SavedLoginsAuthFragment : PreferenceFragmentCompat() {
* Called when authentication succeeds.
*/
private fun navigateToSavedLoginsFragment() {
Logins.openLogins.record(NoExtras())
val directions =
SavedLoginsAuthFragmentDirections.actionSavedLoginsAuthFragmentToLoginsListFragment()
findNavController().navigate(directions)
if (findNavController().currentDestination?.id == R.id.savedLoginsAuthFragment) {
Logins.openLogins.record(NoExtras())
val directions =
SavedLoginsAuthFragmentDirections.actionSavedLoginsAuthFragmentToLoginsListFragment()
findNavController().navigate(directions)
}
}
private fun navigateToSaveLoginSettingFragment() {

Loading…
Cancel
Save