Skip to content

Commit

Permalink
Renamed event
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Mäder <[email protected]>
  • Loading branch information
tsmaeder committed Jul 27, 2021
1 parent 4b17108 commit f8d571f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/plugin-ext/src/main/browser/tasks-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class TasksMainImpl implements TasksMain, Disposable {
this.taskService = container.get(TaskService);
this.taskDefinitionRegistry = container.get(TaskDefinitionRegistry);

this.toDispose.push(container.get(ProvidedTaskConfigurations).onStartUserInteraction((event: TaskStartUserInteractionEvent) => {
this.toDispose.push(container.get(ProvidedTaskConfigurations).onDidStartUserInteraction((event: TaskStartUserInteractionEvent) => {
// we must wait with further processing until the plugin side has had time to clean up its garbage
event.waitUntil(this.proxy.$onDidStartUserInteraction());
}));
Expand Down
8 changes: 4 additions & 4 deletions packages/task/src/browser/provided-task-configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ export class ProvidedTaskConfigurations {
@inject(TaskDefinitionRegistry)
protected readonly taskDefinitionRegistry: TaskDefinitionRegistry;

readonly onStartUserInteractionEmitter: Emitter<TaskStartUserInteractionEvent> = new Emitter<TaskStartUserInteractionEvent>();
readonly onDidStartUserInteractionEmitter: Emitter<TaskStartUserInteractionEvent> = new Emitter<TaskStartUserInteractionEvent>();

private currentToken: number = 0;
private nextToken = 1;

get onStartUserInteraction(): Event<TaskStartUserInteractionEvent> {
return this.onStartUserInteractionEmitter.event;
get onDidStartUserInteraction(): Event<TaskStartUserInteractionEvent> {
return this.onDidStartUserInteractionEmitter.event;
}

startUserAction(): Promise<number> {
const token = this.nextToken++;
return WaitUntilEvent.fire(this.onStartUserInteractionEmitter, { token: token }).then(() => token);
return WaitUntilEvent.fire(this.onDidStartUserInteractionEmitter, { token: token }).then(() => token);
}

/** returns a list of provided tasks */
Expand Down

0 comments on commit f8d571f

Please sign in to comment.