Skip to content

Commit a8a7127

Browse files
committed
more 💄
1 parent 196c2bd commit a8a7127

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/vs/platform/list/browser/listService.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function toWorkbenchListOptions<T>(options: IListOptions<T>, configurationServic
183183
}
184184
};
185185

186-
result.smoothScrolling = configurationService.getValue<boolean>(listSmoothScrolling);
186+
result.smoothScrolling = Boolean(configurationService.getValue<boolean>(listSmoothScrolling));
187187

188188
return [result, disposables];
189189
}
@@ -221,7 +221,7 @@ export class WorkbenchList<T> extends List<T> {
221221
@IConfigurationService configurationService: IConfigurationService,
222222
@IKeybindingService keybindingService: IKeybindingService
223223
) {
224-
const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : configurationService.getValue<boolean>(horizontalScrollingKey);
224+
const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : Boolean(configurationService.getValue<boolean>(horizontalScrollingKey));
225225
const [workbenchListOptions, workbenchListOptionsDisposable] = toWorkbenchListOptions(options, configurationService, keybindingService);
226226

227227
super(user, container, delegate, renderers,
@@ -282,11 +282,11 @@ export class WorkbenchList<T> extends List<T> {
282282
let options: IListOptionsUpdate = {};
283283

284284
if (e.affectsConfiguration(horizontalScrollingKey) && this.horizontalScrolling === undefined) {
285-
const horizontalScrolling = configurationService.getValue<boolean>(horizontalScrollingKey);
285+
const horizontalScrolling = Boolean(configurationService.getValue<boolean>(horizontalScrollingKey));
286286
options = { ...options, horizontalScrolling };
287287
}
288288
if (e.affectsConfiguration(listSmoothScrolling)) {
289-
const smoothScrolling = configurationService.getValue<boolean>(listSmoothScrolling);
289+
const smoothScrolling = Boolean(configurationService.getValue<boolean>(listSmoothScrolling));
290290
options = { ...options, smoothScrolling };
291291
}
292292
if (Object.keys(options).length > 0) {
@@ -348,7 +348,7 @@ export class WorkbenchPagedList<T> extends PagedList<T> {
348348
@IConfigurationService configurationService: IConfigurationService,
349349
@IKeybindingService keybindingService: IKeybindingService
350350
) {
351-
const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : configurationService.getValue<boolean>(horizontalScrollingKey);
351+
const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : Boolean(configurationService.getValue<boolean>(horizontalScrollingKey));
352352
const [workbenchListOptions, workbenchListOptionsDisposable] = toWorkbenchListOptions(options, configurationService, keybindingService);
353353
super(user, container, delegate, renderers,
354354
{
@@ -394,11 +394,11 @@ export class WorkbenchPagedList<T> extends PagedList<T> {
394394
let options: IListOptionsUpdate = {};
395395

396396
if (e.affectsConfiguration(horizontalScrollingKey) && this.horizontalScrolling === undefined) {
397-
const horizontalScrolling = configurationService.getValue<boolean>(horizontalScrollingKey);
397+
const horizontalScrolling = Boolean(configurationService.getValue<boolean>(horizontalScrollingKey));
398398
options = { ...options, horizontalScrolling };
399399
}
400400
if (e.affectsConfiguration(listSmoothScrolling)) {
401-
const smoothScrolling = configurationService.getValue<boolean>(listSmoothScrolling);
401+
const smoothScrolling = Boolean(configurationService.getValue<boolean>(listSmoothScrolling));
402402
options = { ...options, smoothScrolling };
403403
}
404404
if (Object.keys(options).length > 0) {
@@ -469,7 +469,7 @@ export class WorkbenchTable<TRow> extends Table<TRow> {
469469
@IConfigurationService configurationService: IConfigurationService,
470470
@IKeybindingService keybindingService: IKeybindingService
471471
) {
472-
const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : configurationService.getValue<boolean>(horizontalScrollingKey);
472+
const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : Boolean(configurationService.getValue<boolean>(horizontalScrollingKey));
473473
const [workbenchListOptions, workbenchListOptionsDisposable] = toWorkbenchListOptions(options, configurationService, keybindingService);
474474

475475
super(user, container, delegate, columns, renderers,
@@ -531,11 +531,11 @@ export class WorkbenchTable<TRow> extends Table<TRow> {
531531
let options: IListOptionsUpdate = {};
532532

533533
if (e.affectsConfiguration(horizontalScrollingKey) && this.horizontalScrolling === undefined) {
534-
const horizontalScrolling = configurationService.getValue<boolean>(horizontalScrollingKey);
534+
const horizontalScrolling = Boolean(configurationService.getValue<boolean>(horizontalScrollingKey));
535535
options = { ...options, horizontalScrolling };
536536
}
537537
if (e.affectsConfiguration(listSmoothScrolling)) {
538-
const smoothScrolling = configurationService.getValue<boolean>(listSmoothScrolling);
538+
const smoothScrolling = Boolean(configurationService.getValue<boolean>(listSmoothScrolling));
539539
options = { ...options, smoothScrolling };
540540
}
541541
if (Object.keys(options).length > 0) {
@@ -999,18 +999,18 @@ function workbenchTreeDataPreamble<T, TFilterData, TOptions extends IAbstractTre
999999

10001000
const getAutomaticKeyboardNavigation = () => {
10011001
// give priority to the context key value to disable this completely
1002-
let automaticKeyboardNavigation = contextKeyService.getContextKeyValue<boolean>(WorkbenchListAutomaticKeyboardNavigationKey);
1002+
let automaticKeyboardNavigation = Boolean(contextKeyService.getContextKeyValue<boolean>(WorkbenchListAutomaticKeyboardNavigationKey));
10031003

10041004
if (automaticKeyboardNavigation) {
1005-
automaticKeyboardNavigation = configurationService.getValue<boolean>(automaticKeyboardNavigationSettingKey);
1005+
automaticKeyboardNavigation = Boolean(configurationService.getValue<boolean>(automaticKeyboardNavigationSettingKey));
10061006
}
10071007

10081008
return automaticKeyboardNavigation;
10091009
};
10101010

10111011
const accessibilityOn = accessibilityService.isScreenReaderOptimized();
10121012
const keyboardNavigation = options.simpleKeyboardNavigation || accessibilityOn ? 'simple' : configurationService.getValue<string>(keyboardNavigationSettingKey);
1013-
const horizontalScrolling = options.horizontalScrolling !== undefined ? options.horizontalScrolling : configurationService.getValue<boolean>(horizontalScrollingKey);
1013+
const horizontalScrolling = options.horizontalScrolling !== undefined ? options.horizontalScrolling : Boolean(configurationService.getValue<boolean>(horizontalScrollingKey));
10141014
const [workbenchListOptions, disposable] = toWorkbenchListOptions(options, configurationService, keybindingService);
10151015
const additionalScrollHeight = options.additionalScrollHeight;
10161016

@@ -1023,7 +1023,7 @@ function workbenchTreeDataPreamble<T, TFilterData, TOptions extends IAbstractTre
10231023
...workbenchListOptions,
10241024
indent: configurationService.getValue<number>(treeIndentKey),
10251025
renderIndentGuides: configurationService.getValue<RenderIndentGuides>(treeRenderIndentGuidesKey),
1026-
smoothScrolling: configurationService.getValue<boolean>(listSmoothScrolling),
1026+
smoothScrolling: Boolean(configurationService.getValue<boolean>(listSmoothScrolling)),
10271027
automaticKeyboardNavigation: getAutomaticKeyboardNavigation(),
10281028
simpleKeyboardNavigation: keyboardNavigation === 'simple',
10291029
filterOnType: keyboardNavigation === 'filter',
@@ -1120,7 +1120,7 @@ class WorkbenchTreeInternals<TInput, T, TFilterData> {
11201120
newOptions = { ...newOptions, renderIndentGuides };
11211121
}
11221122
if (e.affectsConfiguration(listSmoothScrolling)) {
1123-
const smoothScrolling = configurationService.getValue<boolean>(listSmoothScrolling);
1123+
const smoothScrolling = Boolean(configurationService.getValue<boolean>(listSmoothScrolling));
11241124
newOptions = { ...newOptions, smoothScrolling };
11251125
}
11261126
if (e.affectsConfiguration(keyboardNavigationSettingKey)) {
@@ -1130,7 +1130,7 @@ class WorkbenchTreeInternals<TInput, T, TFilterData> {
11301130
newOptions = { ...newOptions, automaticKeyboardNavigation: getAutomaticKeyboardNavigation() };
11311131
}
11321132
if (e.affectsConfiguration(horizontalScrollingKey) && options.horizontalScrolling === undefined) {
1133-
const horizontalScrolling = configurationService.getValue<boolean>(horizontalScrollingKey);
1133+
const horizontalScrolling = Boolean(configurationService.getValue<boolean>(horizontalScrollingKey));
11341134
newOptions = { ...newOptions, horizontalScrolling };
11351135
}
11361136
if (e.affectsConfiguration(treeExpandMode) && options.expandOnlyOnTwistieClick === undefined) {

0 commit comments

Comments
 (0)