@@ -975,6 +975,12 @@ webui.SideBarView = function(mainView, noEventHandlers) {
975975 } ) ;
976976 } ;
977977
978+ self . refreshSideBar = function ( ) {
979+ self . fetchSection ( $ ( "#sidebar-local-branches" , self . element ) [ 0 ] , "Local Branches" , "local-branches" , "branch --verbose --verbose" ) ;
980+ self . fetchSection ( $ ( "#sidebar-remote-branches" , self . element ) [ 0 ] , "Remote Branches" , "remote-branches" , "branch --remotes" ) ;
981+ self . fetchSection ( $ ( "#sidebar-tags" , self . element ) [ 0 ] , "Tags" , "tags" , "tag" ) ;
982+ }
983+
978984 self . mainView = mainView ;
979985 self . currentContext = self . getCurrentContext ( ) ;
980986 self . element = $ ( '<div id="sidebar">' +
@@ -1059,12 +1065,11 @@ webui.SideBarView = function(mainView, noEventHandlers) {
10591065 if ( ( window !== window . parent ) || ( navigator . userAgent . indexOf ( 'MSIE 7' ) > - 1 ) || ( navigator . userAgent . indexOf ( " Code/" ) > - 1 ) ) {
10601066 $ ( "#sidebar-home" , self . element ) . remove ( ) ;
10611067 }
1068+
10621069
10631070 self . getPackageVersion ( ) ;
10641071 self . getEnvironment ( )
1065- self . fetchSection ( $ ( "#sidebar-local-branches" , self . element ) [ 0 ] , "Local Branches" , "local-branches" , "branch --verbose --verbose" ) ;
1066- self . fetchSection ( $ ( "#sidebar-remote-branches" , self . element ) [ 0 ] , "Remote Branches" , "remote-branches" , "branch --remotes" ) ;
1067- self . fetchSection ( $ ( "#sidebar-tags" , self . element ) [ 0 ] , "Tags" , "tags" , "tag" ) ;
1072+ self . refreshSideBar ( ) ;
10681073
10691074 if ( ! noEventHandlers ) {
10701075 $ ( document ) . on ( 'click' , '.btn-checkout-local-branch' , self . checkoutLocalBranch ) ;
@@ -2620,6 +2625,8 @@ webui.NewChangedFilesView = function(workspaceView) {
26202625 } else {
26212626 var commitMessage = $ ( '#commitMsg' ) . val ( ) ;
26222627 self . commit ( commitMessage , $ ( "#commitMsgDetail" ) . val ( ) ) ;
2628+ setTimeout ( updateSideBar , 2000 ) ;
2629+ ;
26232630 }
26242631 }
26252632 } )
0 commit comments