[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 { } else {
val isLastSession = val isLastSession =
sessionManager.sessionsOfType(private = session.private).count() == 1 sessionManager.sessionsOfType(private = session.private).count() == 1
sessionManager.remove(session, true) sessionManager.remove(session, session.hasParentSession)
return !isLastSession // Jump to tab overview if last session was removed val goToOverview = isLastSession || !session.hasParentSession
return !goToOverview
} }
} }
return false return false

Loading…
Cancel
Save