File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -373,13 +373,11 @@ GuiControl.prototype.content_ready = function (callback) {
373373
374374GuiControl . prototype . selectDefaultTabWhenConnected = function ( ) {
375375 ConfigStorage . get ( [ 'rememberLastTab' , 'lastTab' ] , function ( result ) {
376- if ( ! ( result . rememberLastTab
377- && ! ! result . lastTab
378- && result . lastTab . substring ( 4 ) !== "cli" ) ) {
376+ if ( result . rememberLastTab && result . lastTab ) {
377+ $ ( `#tabs ul.mode-connected . ${ result . lastTab } a` ) . click ( ) ;
378+ } else {
379379 $ ( '#tabs ul.mode-connected .tab_setup a' ) . click ( ) ;
380- return ;
381380 }
382- $ ( `#tabs ul.mode-connected .${ result . lastTab } a` ) . click ( ) ;
383381 } ) ;
384382} ;
385383
Original file line number Diff line number Diff line change @@ -219,9 +219,15 @@ function startProcess() {
219219 // Tabs
220220 $ ( "#tabs ul.mode-connected li" ) . click ( function ( ) {
221221 // store the first class of the current tab (omit things like ".active")
222- ConfigStorage . set (
223- { lastTab : $ ( this ) . attr ( "class" ) . split ( ' ' ) [ 0 ] }
224- ) ;
222+ const tabName = $ ( this ) . attr ( "class" ) . split ( ' ' ) [ 0 ] ;
223+
224+ const tabNameWithoutPrefix = tabName . substring ( 4 ) ;
225+ if ( tabNameWithoutPrefix !== "cli" ) {
226+ // Don't store 'cli' otherwise you can never connect to another tab.
227+ ConfigStorage . set (
228+ { lastTab : tabName } ,
229+ ) ;
230+ }
225231 } ) ;
226232
227233 if ( GUI . isCordova ( ) ) {
You can’t perform that action at this time.
0 commit comments