Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/plus/gk/subscriptionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ export class SubscriptionService implements Disposable {
return this._onDidChangeFeaturePreview.event;
}

private _onDidCheckIn = new EventEmitter<void>();
get onDidCheckIn(): Event<void> {
private _onDidCheckIn = new EventEmitter<{ force?: boolean } | void>();
get onDidCheckIn(): Event<{ force?: boolean } | void> {
return this._onDidCheckIn.event;
}

Expand Down Expand Up @@ -1067,7 +1067,7 @@ export class SubscriptionService implements Disposable {
return;
}

const validating = this.checkInAndValidateCore(session, source, options?.organizationId);
const validating = this.checkInAndValidateCore(session, source, options?.organizationId, options?.force);
if (!options?.showSlowProgress) return validating;

// Show progress if we are waiting too long
Expand All @@ -1088,6 +1088,7 @@ export class SubscriptionService implements Disposable {
session: AuthenticationSession,
source: Source | undefined,
organizationId?: string,
force?: boolean,
): Promise<GKCheckInResponse | undefined> {
const scope = getLogScope();
this._lastValidatedDate = undefined;
Expand Down Expand Up @@ -1120,7 +1121,7 @@ export class SubscriptionService implements Disposable {
throw new AccountValidationError('Unable to validate account', undefined, rsp.status, rsp.statusText);
}

this._onDidCheckIn.fire();
this._onDidCheckIn.fire({ force: force });

const data: GKCheckInResponse = await rsp.json();
this._getCheckInData = () => Promise.resolve(data);
Expand Down
4 changes: 2 additions & 2 deletions src/plus/integrations/integrationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ export class IntegrationService implements Disposable {
}
}

private onUserCheckedIn() {
void this.syncCloudIntegrations(false);
private onUserCheckedIn(options?: { force?: boolean } | void) {
void this.syncCloudIntegrations(Boolean(options?.force));
}

private onDidChangeSubscription(e: SubscriptionChangeEvent) {
Expand Down