1
0
Fork 0

Removes initial and default session

master
Jeff Boek 2019-01-30 14:23:00 -08:00
parent 653cbf8987
commit bacee18344
1 changed files with 1 additions and 15 deletions

View File

@ -56,21 +56,7 @@ class Core(private val context: Context) {
* case all sessions/tabs are closed.
*/
val sessionManager by lazy {
val sessionStorage = SessionStorage(context, engine)
SessionManager(engine, defaultSession = { Session("about:blank") }).apply {
sessionStorage.restore()?.let { snapshot -> restore(snapshot) }
if (size == 0) {
val initialSession = Session("https://www.mozilla.org")
add(initialSession)
}
sessionStorage.autoSave(this)
.periodicallyInForeground(interval = 30, unit = TimeUnit.SECONDS)
.whenGoingToBackground()
.whenSessionsChange()
}
SessionManager(engine)
}
/**