Skip to content

Commit

Permalink
use affectsConfiguration (#169919)
Browse files Browse the repository at this point in the history
related to #169806
  • Loading branch information
joaomoreno committed Dec 23, 2022
1 parent 7f65f02 commit 27a911a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vs/platform/list/browser/listService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,10 @@ abstract class ResourceNavigator<T> extends Disposable {

if (typeof options?.openOnSingleClick !== 'boolean' && options?.configurationService) {
this.openOnSingleClick = options?.configurationService!.getValue(openModeSettingKey) !== 'doubleClick';
this._register(options?.configurationService.onDidChangeConfiguration(() => {
this.openOnSingleClick = options?.configurationService!.getValue(openModeSettingKey) !== 'doubleClick';
this._register(options?.configurationService.onDidChangeConfiguration(e => {
if (e.affectsConfiguration(openModeSettingKey)) {
this.openOnSingleClick = options?.configurationService!.getValue(openModeSettingKey) !== 'doubleClick';
}
}));
} else {
this.openOnSingleClick = options?.openOnSingleClick ?? true;
Expand Down

0 comments on commit 27a911a

Please sign in to comment.