@@ -38,6 +38,7 @@ export class LaunchpadIndicator implements Disposable {
38
38
) {
39
39
this . _disposable = Disposable . from (
40
40
window . onDidChangeWindowState ( this . onWindowStateChanged , this ) ,
41
+ provider . onDidChange ( this . onLaunchpadChanged , this ) ,
41
42
provider . onDidRefresh ( this . onLaunchpadRefreshed , this ) ,
42
43
configuration . onDidChange ( this . onConfigurationChanged , this ) ,
43
44
container . integrations . onDidChangeConnectionState ( this . onConnectedIntegrationsChanged , this ) ,
@@ -130,6 +131,24 @@ export class LaunchpadIndicator implements Disposable {
130
131
this . updateStatusBarState ( 'load' , e . items ) ;
131
132
}
132
133
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
+
133
152
private async onReady ( ) : Promise < void > {
134
153
this . _statusBarLaunchpad = window . createStatusBarItem ( 'gitlens.launchpad' , StatusBarAlignment . Left , 10000 - 3 ) ;
135
154
this . _statusBarLaunchpad . name = 'GitLens Launchpad' ;
0 commit comments