@@ -38,6 +38,7 @@ export class LaunchpadIndicator implements Disposable {
3838 ) {
3939 this . _disposable = Disposable . from (
4040 window . onDidChangeWindowState ( this . onWindowStateChanged , this ) ,
41+ provider . onDidChange ( this . onLaunchpadChanged , this ) ,
4142 provider . onDidRefresh ( this . onLaunchpadRefreshed , this ) ,
4243 configuration . onDidChange ( this . onConfigurationChanged , this ) ,
4344 container . integrations . onDidChangeConnectionState ( this . onConnectedIntegrationsChanged , this ) ,
@@ -130,6 +131,24 @@ export class LaunchpadIndicator implements Disposable {
130131 this . updateStatusBarState ( 'load' , e . items ) ;
131132 }
132133
134+ private async onLaunchpadChanged ( ) {
135+ this . _hasRefreshed = false ;
136+ if ( ! this . pollingEnabled ) {
137+ this . updateStatusBarState ( 'idle' ) ;
138+
139+ return ;
140+ }
141+
142+ const items = await this . provider . getCategorizedItems ( ) ;
143+ if ( items . error != null ) {
144+ this . updateStatusBarState ( 'failed' ) ;
145+
146+ return ;
147+ }
148+
149+ this . updateStatusBarState ( 'load' , items . items ) ;
150+ }
151+
133152 private async onReady ( ) : Promise < void > {
134153 this . _statusBarLaunchpad = window . createStatusBarItem ( 'gitlens.launchpad' , StatusBarAlignment . Left , 10000 - 3 ) ;
135154 this . _statusBarLaunchpad . name = 'GitLens Launchpad' ;
0 commit comments