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

Fix port forwarding sequencing issues

上级 c5821433
......@@ -64,14 +64,15 @@ export class ForwardedPortsView extends Disposable implements IWorkbenchContribu
}
private enableBadgeAndStatusBar() {
this._register(this.remoteExplorerService.tunnelModel.onForwardPort(() => {
this.updateStatusBar();
}));
this._register(this.remoteExplorerService.tunnelModel.onClosePort(() => {
this.updateStatusBar();
}));
const disposable = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry).onViewsRegistered(e => {
if (e.find(view => view.views.find(viewDescriptor => viewDescriptor.id === TUNNEL_VIEW_ID))) {
this._register(this.remoteExplorerService.tunnelModel.onForwardPort(() => {
this.updateStatusBar();
}));
this._register(this.remoteExplorerService.tunnelModel.onClosePort(() => {
this.updateStatusBar();
}));
this.updateStatusBar();
disposable.dispose();
}
......
......@@ -414,7 +414,8 @@ class TunnelItem implements ITunnelItem {
if (address.length < 15) {
return address;
}
return new URL(address).host ?? address;
const host = new URL(address).host;
return host.length > 0 ? host : address;
}
set description(description: string | undefined) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册