Skip to content

Commit

Permalink
update tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpareles committed Jan 24, 2025
1 parent 57628ec commit 00f10c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/platform/void/common/voidUpdateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { createDecorator } from '../../instantiation/common/instantiation.js';
import { ProxyChannel } from '../../../base/parts/ipc/common/ipc.js';
import { IMainProcessService } from '../../ipc/common/mainProcessService.js';
import { InstantiationType, registerSingleton } from '../../instantiation/common/extensions.js';
import { IMetricsService } from './metricsService.js';



Expand All @@ -27,16 +28,17 @@ export class VoidUpdateService implements IVoidUpdateService {

constructor(
@IMainProcessService mainProcessService: IMainProcessService, // (only usable on client side)
@IMetricsService private readonly metricsService: IMetricsService,
) {
// creates an IPC proxy to use metricsMainService.ts
this.voidUpdateService = ProxyChannel.toService<IVoidUpdateService>(mainProcessService.getChannel('void-channel-update'));
}



// anything transmitted over a channel must be async even if it looks like it doesn't have to be
check: IVoidUpdateService['check'] = async () => {
const res = await this.voidUpdateService.check()
this.metricsService.capture('Check for Updates', { ...res })
return res
}
}
Expand Down

0 comments on commit 00f10c2

Please sign in to comment.