Skip to content

Commit 34a5a16

Browse files
committed
Make manual sync update sessions
(#4297, #4298)
1 parent 5f7cecc commit 34a5a16

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/plus/gk/subscriptionService.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ export class SubscriptionService implements Disposable {
114114
return this._onDidChangeFeaturePreview.event;
115115
}
116116

117-
private _onDidCheckIn = new EventEmitter<void>();
118-
get onDidCheckIn(): Event<void> {
117+
private _onDidCheckIn = new EventEmitter<{ force?: boolean } | void>();
118+
get onDidCheckIn(): Event<{ force?: boolean } | void> {
119119
return this._onDidCheckIn.event;
120120
}
121121

@@ -1067,7 +1067,7 @@ export class SubscriptionService implements Disposable {
10671067
return;
10681068
}
10691069

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

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

1123-
this._onDidCheckIn.fire();
1124+
this._onDidCheckIn.fire({ force: force });
11241125

11251126
const data: GKCheckInResponse = await rsp.json();
11261127
this._getCheckInData = () => Promise.resolve(data);

src/plus/integrations/integrationService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ export class IntegrationService implements Disposable {
173173
}
174174
}
175175

176-
private onUserCheckedIn() {
177-
void this.syncCloudIntegrations(false);
176+
private onUserCheckedIn(options?: { force?: boolean } | void) {
177+
void this.syncCloudIntegrations(Boolean(options?.force));
178178
}
179179

180180
private onDidChangeSubscription(e: SubscriptionChangeEvent) {

0 commit comments

Comments
 (0)