empty view: dispose listener
This commit is contained in:
parent
8f47d31d32
commit
738d907bda
1 changed files with 2 additions and 3 deletions
|
@ -57,8 +57,7 @@ export class EmptyView extends ViewsViewletPanel {
|
|||
this.button = new Button(section);
|
||||
attachButtonStyler(this.button, this.themeService);
|
||||
|
||||
// TODO@isidor: need to dispose this listener
|
||||
this.button.onDidClick(() => {
|
||||
this.disposables.push(this.button.onDidClick(() => {
|
||||
const actionClass = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? AddRootFolderAction : env.isMacintosh ? OpenFileFolderAction : OpenFolderAction;
|
||||
const action = this.instantiationService.createInstance<string, string, IAction>(actionClass, actionClass.ID, actionClass.LABEL);
|
||||
this.actionRunner.run(action).done(() => {
|
||||
|
@ -67,7 +66,7 @@ export class EmptyView extends ViewsViewletPanel {
|
|||
action.dispose();
|
||||
errors.onUnexpectedError(err);
|
||||
});
|
||||
});
|
||||
}));
|
||||
this.setLabels();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue