1
0
Fork 0

Jump to tab overview if closed tab has no parent session

master
mawen7 2019-11-18 18:08:46 +01:00 committed by Emily Kager
parent 984d8c7b13
commit 1e813a9609
1 changed files with 3 additions and 2 deletions

View File

@ -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