Skip to content

Commit 9c0f910

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

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
}
@@ -1396,8 +1401,9 @@ async function updateContextItems(
13961401
container: Container,
13971402
context: Context,
13981403
options?: { force?: boolean; search?: string },
1404+
cancellation?: CancellationToken,
13991405
) {
1400-
context.result = await container.launchpad.getCategorizedItems(options);
1406+
context.result = await container.launchpad.getCategorizedItems(options, cancellation);
14011407
if (container.telemetry.enabled) {
14021408
updateTelemetryContext(context);
14031409
}

0 commit comments

Comments
 (0)