mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode 1b314ab317fbff7d799b21754326b7d849889ceb
This commit is contained in:
@@ -18,7 +18,6 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { SplitView, Sizing } from 'vs/base/browser/ui/splitview/splitview';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { values } from 'vs/base/common/map';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
@@ -44,6 +43,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { Iterable } from 'vs/base/common/iterator';
|
||||
|
||||
export const VIEWLET_ID = 'workbench.view.accountpanel';
|
||||
|
||||
@@ -219,7 +219,7 @@ export class AccountDialog extends Modal {
|
||||
this._addAccountButton.label = localize('accountDialog.addConnection', "Add an account");
|
||||
|
||||
this._register(this._addAccountButton.onDidClick(async () => {
|
||||
const vals = values(this._providerViewsMap);
|
||||
const vals = Iterable.consume(this._providerViewsMap.values())[0];
|
||||
|
||||
let pickedValue: string;
|
||||
if (vals.length === 0) {
|
||||
@@ -291,8 +291,8 @@ export class AccountDialog extends Modal {
|
||||
private showSplitView() {
|
||||
this._splitViewContainer.hidden = false;
|
||||
this._noaccountViewContainer.hidden = true;
|
||||
if (values(this._providerViewsMap).length > 0) {
|
||||
const firstView = values(this._providerViewsMap)[0];
|
||||
if (Iterable.consume(this._providerViewsMap.values()).length > 0) {
|
||||
const firstView = this._providerViewsMap.values()[0];
|
||||
if (firstView instanceof AccountPanel) {
|
||||
firstView.setSelection([0]);
|
||||
firstView.focus();
|
||||
@@ -301,7 +301,7 @@ export class AccountDialog extends Modal {
|
||||
}
|
||||
|
||||
private isEmptyLinkedAccount(): boolean {
|
||||
for (const provider of values(this._providerViewsMap)) {
|
||||
for (const provider of this._providerViewsMap.values()) {
|
||||
const listView = provider.view;
|
||||
if (listView && listView.length > 0) {
|
||||
return false;
|
||||
@@ -312,7 +312,7 @@ export class AccountDialog extends Modal {
|
||||
|
||||
public dispose(): void {
|
||||
super.dispose();
|
||||
for (const provider of values(this._providerViewsMap)) {
|
||||
for (const provider of this._providerViewsMap.values()) {
|
||||
if (provider.addAccountAction) {
|
||||
provider.addAccountAction.dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user