Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

represent default profile #161799

Merged
merged 1 commit into from Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -1064,7 +1064,7 @@ export class ActivitybarPart extends Part implements IPaneCompositeSelectorPart
}

private get profilesVisibilityPreference(): boolean {
return this.userDataProfilesService.profiles.length > 1 && !this.userDataProfileService.currentProfile.isDefault && this.storageService.getBoolean(ProfilesActivityActionViewItem.PROFILES_VISIBILITY_PREFERENCE_KEY, StorageScope.PROFILE, true);
return this.storageService.getBoolean(ProfilesActivityActionViewItem.PROFILES_VISIBILITY_PREFERENCE_KEY, StorageScope.PROFILE, this.userDataProfilesService.profiles.length > 1);
}

private set profilesVisibilityPreference(value: boolean) {
Expand Down
Expand Up @@ -4,11 +4,16 @@
*--------------------------------------------------------------------------------------------*/

import { Promises } from 'vs/base/common/async';
import { Codicon } from 'vs/base/common/codicons';
import { Emitter } from 'vs/base/common/event';
import { Disposable } from 'vs/base/common/lifecycle';
import { localize } from 'vs/nls';
import { registerIcon } from 'vs/platform/theme/common/iconRegistry';
import { IUserDataProfile, IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';
import { DidChangeUserDataProfileEvent, IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile';

const defaultUserDataProfileIcon = registerIcon('defaultSettingsProfiles-icon', Codicon.settings, localize('settingsProfilesIcon', 'Icon for Default Settings Profiles.'));

export class UserDataProfileService extends Disposable implements IUserDataProfileService {

readonly _serviceBrand: undefined;
Expand Down Expand Up @@ -65,6 +70,9 @@ export class UserDataProfileService extends Disposable implements IUserDataProfi
}

getShortName(profile: IUserDataProfile): string {
if (profile.isDefault) {
return `$(${defaultUserDataProfileIcon.id})`;
}
if (profile.shortName) {
return profile.shortName;
}
Expand Down