Skip to content

Commit d9cb63f

Browse files
committed
Passes debouncer's cancelation token to the getCategorizedItems method
(#3543)
1 parent 6885b30 commit d9cb63f

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 {
@@ -520,7 +520,12 @@ export class LaunchpadCommand extends QuickCommand<State> {
520520
quickpick.busy = true;
521521
try {
522522
await this.updateItemsDebouncer(async cancellationToken => {
523-
await updateContextItems(this.container, context, { force: true, search: search });
523+
await updateContextItems(
524+
this.container,
525+
context,
526+
{ force: true, search: search },
527+
cancellationToken,
528+
);
524529
if (cancellationToken.isCancellationRequested) {
525530
return;
526531
}
@@ -1352,8 +1357,9 @@ async function updateContextItems(
13521357
container: Container,
13531358
context: Context,
13541359
options?: { force?: boolean; search?: string },
1360+
cancellation?: CancellationToken,
13551361
) {
1356-
const result = await container.launchpad.getCategorizedItems(options);
1362+
const result = await container.launchpad.getCategorizedItems(options, cancellation);
13571363
if (options?.search) {
13581364
context.result = container.launchpad.mergeSearchedCategorizedItems(context.result, result);
13591365
} else {

0 commit comments

Comments
 (0)