File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import { ContextValues, getViewNodeId } from './nodes/abstract/viewNode';
2222import type { GroupingNode } from './nodes/groupingNode' ;
2323import { LaunchpadViewGroupingNode } from './nodes/launchpadViewGroupingNode' ;
2424import { getPullRequestChildren , getPullRequestTooltip } from './nodes/pullRequestNode' ;
25- import { ViewBase } from './viewBase' ;
25+ import { disposeChildren , ViewBase } from './viewBase' ;
2626import { registerViewCommand } from './viewCommands' ;
2727
2828export class LaunchpadItemNode extends CacheableChildrenViewNode < 'launchpad-item' , LaunchpadView > {
@@ -121,8 +121,23 @@ export class LaunchpadViewNode extends CacheableChildrenViewNode<
121121 LaunchpadView ,
122122 GroupingNode | LaunchpadItemNode
123123> {
124+ private disposable : Disposable ;
125+
124126 constructor ( view : LaunchpadView ) {
125127 super ( 'launchpad' , unknownGitUri , view ) ;
128+ this . disposable = Disposable . from ( this . view . container . launchpad . onDidChange ( this . refresh , this ) ) ;
129+ }
130+
131+ override dispose ( ) {
132+ this . disposable ?. dispose ( ) ;
133+ super . dispose ( ) ;
134+ }
135+
136+ override refresh ( ) {
137+ if ( this . children == null ) return ;
138+
139+ disposeChildren ( this . children ) ;
140+ this . children = undefined ;
126141 }
127142
128143 async getChildren ( ) : Promise < ( GroupingNode | LaunchpadItemNode ) [ ] > {
You can’t perform that action at this time.
0 commit comments