Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandeep Somavarapu <sasomava@microsoft.com>2022-11-11 16:32:17 +0300
committerGitHub <noreply@github.com>2022-11-11 16:32:17 +0300
commit86223f38b33c10f626297501995aa7ae243b3cde (patch)
tree2a7a403b15c7814eb2f7d0bc59d115cd39dd968c
parente5bf5a7939d586e33d5ae822891040dfa906aeb5 (diff)
fix initialzing profiles in web (#166112)
-rw-r--r--src/vs/workbench/browser/web.main.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vs/workbench/browser/web.main.ts b/src/vs/workbench/browser/web.main.ts
index 0053149f6c9..fcb5e065ba7 100644
--- a/src/vs/workbench/browser/web.main.ts
+++ b/src/vs/workbench/browser/web.main.ts
@@ -284,11 +284,6 @@ export class BrowserMain extends Disposable {
// User Data Profiles
const userDataProfilesService = new BrowserUserDataProfilesService(environmentService, fileService, uriIdentityService, logService);
serviceCollection.set(IUserDataProfilesService, userDataProfilesService);
- const lastActiveProfile = environmentService.lastActiveProfile ? userDataProfilesService.profiles.find(p => p.id === environmentService.lastActiveProfile) : undefined;
- const currentProfile = userDataProfilesService.getOrSetProfileForWorkspace(isWorkspaceIdentifier(workspace) || isSingleFolderWorkspaceIdentifier(workspace) ? workspace : 'empty-window', lastActiveProfile ?? userDataProfilesService.defaultProfile);
- const userDataProfileService = new UserDataProfileService(currentProfile, userDataProfilesService);
- serviceCollection.set(IUserDataProfileService, userDataProfileService);
-
let isProfilesEnablementConfigured = false;
if (environmentService.remoteAuthority) {
// Always Disabled in web with remote connection
@@ -304,6 +299,11 @@ export class BrowserMain extends Disposable {
}
}
+ const lastActiveProfile = environmentService.lastActiveProfile ? userDataProfilesService.profiles.find(p => p.id === environmentService.lastActiveProfile) : undefined;
+ const currentProfile = userDataProfilesService.getOrSetProfileForWorkspace(isWorkspaceIdentifier(workspace) || isSingleFolderWorkspaceIdentifier(workspace) ? workspace : 'empty-window', lastActiveProfile ?? userDataProfilesService.defaultProfile);
+ const userDataProfileService = new UserDataProfileService(currentProfile, userDataProfilesService);
+ serviceCollection.set(IUserDataProfileService, userDataProfileService);
+
// Long running services (workspace, config, storage)
const [configurationService, storageService] = await Promise.all([
this.createWorkspaceService(workspace, environmentService, userDataProfileService, userDataProfilesService, fileService, remoteAgentService, uriIdentityService, logService).then(service => {