Skip to content

Commit b00db61

Browse files
committed
Passes debouncer's cancelation token to the getCategorizedItems method
(#3543, #3684)
1 parent ef31b2c commit b00db61

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/plus/launchpad/launchpad.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { QuickInputButton, QuickPick, QuickPickItem } from 'vscode';
1+
import type { CancellationToken, QuickInputButton, QuickPick, QuickPickItem } from 'vscode';
22
import { commands, ThemeIcon, Uri } from 'vscode';
33
import { getAvatarUri } from '../../avatars';
44
import type {
@@ -524,7 +524,12 @@ export class LaunchpadCommand extends QuickCommand<State> {
524524
quickpick.busy = true;
525525
try {
526526
await this.updateItemsDebouncer(async cancellationToken => {
527-
await updateContextItems(this.container, context, { force: true, search: search });
527+
await updateContextItems(
528+
this.container,
529+
context,
530+
{ force: true, search: search },
531+
cancellationToken,
532+
);
528533
if (cancellationToken.isCancellationRequested) {
529534
return;
530535
}
@@ -1345,8 +1350,9 @@ async function updateContextItems(
13451350
container: Container,
13461351
context: Context,
13471352
options?: { force?: boolean; search?: string },
1353+
cancellation?: CancellationToken,
13481354
) {
1349-
context.result = await container.launchpad.getCategorizedItems(options);
1355+
context.result = await container.launchpad.getCategorizedItems(options, cancellation);
13501356
if (container.telemetry.enabled) {
13511357
updateTelemetryContext(context);
13521358
}

0 commit comments

Comments
 (0)