Hide badge if trust state changes

This commit is contained in:
Ladislau Szomoru 2021-02-22 20:36:52 +01:00
parent 5654c838e8
commit e70d90fddf
2 changed files with 6 additions and 2 deletions

View file

@ -110,6 +110,12 @@ export class WorkspaceTrustRequestHandler extends Disposable implements IWorkben
}
}));
this._register(this.workspaceTrustService.onDidChangeTrustState(trustState => {
if (trustState.currentTrustState !== undefined && trustState.currentTrustState !== WorkspaceTrustState.Unknown) {
this.toggleRequestBadge(false);
}
}));
this._register(this.configurationService.onDidChangeConfiguration(e => {
if (e.affectsConfiguration(WORKSPACE_TRUST_ENABLED)) {
const isEnabled = this.configurationService.getValue<boolean>(WORKSPACE_TRUST_ENABLED);

View file

@ -163,8 +163,6 @@ export class WorkspaceTrustEditor extends EditorPane {
private onDidChangeSetting(change: IWorkspaceTrustSettingChangeEvent) {
if (this.workspaceTrustEditorModel) {
if (isArray(change.value)) {
console.log(change.key);
console.log(change.value);
if (change.key === 'trustedFolders') {
this.workspaceTrustEditorModel.dataModel.setTrustedFolders(change.value.map(item => URI.file(item)));
}