Skip to content

Commit 3bd65ba

Browse files
committed
Fix config sync during onboarding
1 parent 524c7ef commit 3bd65ba

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/views/onboarding/component.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,16 @@ const FirstSyncStepComponent = ({
308308
},
309309
);
310310
await syncManager.loadMetadata();
311+
// When loading the plugin we also load the metadata, though since by default
312+
// configs sync is enabled we need to remove them if necessary. Otherwise they
313+
// would be synced even if the user doesn't want them to be.
314+
// We also add them if they want to sync config dirs just for completeness, though
315+
// they should already be there.
316+
if (stepData.sync.syncConfigDir) {
317+
await syncManager.addConfigDirToMetadata();
318+
} else {
319+
await syncManager.removeConfigDirFromMetadata();
320+
}
311321
try {
312322
await syncManager.firstSync();
313323
} catch (e) {

0 commit comments

Comments
 (0)