@@ -94,7 +94,7 @@ export class Browser extends StatefulClass {
9494
9595 settings : Stateful < Settings > = createState ( {
9696 theme : "system" ,
97- startupPage : "new-tab " ,
97+ startupPage : "continue " ,
9898 defaultZoom : 100 ,
9999 showBookmarksBar : true ,
100100 defaultSearchEngine : "google" ,
@@ -219,24 +219,24 @@ export class Browser extends StatefulClass {
219219
220220 if ( de . settings . startupPage === "continue" ) {
221221 for ( let detab of de . tabs ) {
222- let tab = this . newTab ( ) ;
222+ let tab = this . newTab ( undefined , false , detab . id ) ;
223223 tab . deserialize ( detab ) ;
224224 tab . history . justTriggeredNavigation = true ;
225225 tab . history . go ( 0 , false ) ;
226226 }
227+ this . activetab = this . tabs . find ( ( t ) => t . id == de . activetab ) ! ;
227228 } else {
228229 this . tabs [ 0 ] = this . newTab ( ) ;
230+ this . activetab = this . tabs [ 0 ] ;
229231 }
230- this . activetab = this . tabs [ 0 ] ;
231232 this . bookmarks = de . bookmarks . map ( createState ) ;
232233 this . globalDownloadHistory = de . globalDownloadHistory . map ( createState ) ;
233234 this . settings = createState ( de . settings ) ;
234235 this . cookieJar . load ( de . cookiedump ) ;
235- // this.activetab = this.tabs.find((t) => t.id == de.activetab)!;
236236 }
237237
238- newTab ( url ?: URL , focusomnibox : boolean = false ) {
239- let tab = new Tab ( url ) ;
238+ newTab ( url ?: URL , focusomnibox : boolean = false , id ?: number ) {
239+ let tab = new Tab ( url , id ) ;
240240 pushTab ( tab ) ;
241241 this . tabs = [ ...this . tabs , tab ] ;
242242 this . activetab = tab ;
0 commit comments