Don't autostore cloud changes if not already signed in

This commit is contained in:
Joyce Er 2023-04-28 14:35:40 -07:00
parent 86b1962b0e
commit 34cba75c51

View file

@ -160,7 +160,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
this._register(this.fileService.registerProvider(EditSessionsFileSystemProvider.SCHEMA, new EditSessionsFileSystemProvider(this.editSessionsStorageService)));
this.lifecycleService.onWillShutdown((e) => {
if (e.reason !== ShutdownReason.RELOAD && this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown' && !isWeb) {
if (e.reason !== ShutdownReason.RELOAD && this.editSessionsStorageService.isSignedIn && this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown' && !isWeb) {
e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: localize('autoStoreWorkingChanges', 'Storing current working changes...') });
}
});