mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Hide badge if trust state changes
This commit is contained in:
parent
5654c838e8
commit
e70d90fddf
|
@ -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);
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue