提交 dd72e8d0 编写于 作者: A Alex Ross

Fix ports status bar entry not updating with number

上级 edd5e11c
......@@ -99,8 +99,12 @@ export class ForwardedPortsView extends Disposable implements IWorkbenchContribu
}
private updateStatusBar() {
if (!this.entryAccessor && this.remoteExplorerService.tunnelModel.forwarded.size > 0) {
this._register(this.entryAccessor = this.statusbarService.addEntry(this.entry, 'status.forwardedPorts', nls.localize('status.forwardedPorts', "Forwarded Ports"), StatusbarAlignment.LEFT, 40));
if (this.remoteExplorerService.tunnelModel.forwarded.size > 0) {
if (!this.entryAccessor) {
this._register(this.entryAccessor = this.statusbarService.addEntry(this.entry, 'status.forwardedPorts', nls.localize('status.forwardedPorts', "Forwarded Ports"), StatusbarAlignment.LEFT, 40));
} else {
this.entryAccessor.update(this.entry);
}
} else if (this.entryAccessor && this.remoteExplorerService.tunnelModel.forwarded.size === 0) {
this.entryAccessor.dispose();
this.entryAccessor = undefined;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册