[fenix] For https://github.com/mozilla-mobile/fenix/issues/19132 - Fix navigation on disconnect started from tabsTray

- Added checks to popBackStack from the Disconnect Logged-in User Dialog, either back to settings, browserFragment or homeFragment.
pull/600/head
codrut.topliceanu 3 years ago committed by Jonathan Almeida
parent 964b03a65f
commit 47327e0100

@ -66,9 +66,10 @@ class SignOutFragment : AppCompatDialogFragment() {
accountManager.logout() accountManager.logout()
}.invokeOnCompletion { }.invokeOnCompletion {
runIfFragmentIsAttached { runIfFragmentIsAttached {
if (!findNavController().popBackStack(R.id.settingsFragment, false)) { if (this.isVisible) {
dismiss() dismiss()
} }
findNavController().popBackStack()
} }
} }
} }

Loading…
Cancel
Save