[fenix] Jump to tab overview if closed tab has no parent session

pull/600/head
mawen7 5 years ago committed by Emily Kager
parent e2610eec54
commit f99cc9e5c4

@ -535,8 +535,9 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs
} else {
val isLastSession =
sessionManager.sessionsOfType(private = session.private).count() == 1
sessionManager.remove(session, true)
return !isLastSession // Jump to tab overview if last session was removed
sessionManager.remove(session, session.hasParentSession)
val goToOverview = isLastSession || !session.hasParentSession
return !goToOverview
}
}
return false

Loading…
Cancel
Save