From b9a0c656d324492f2f2a709e6a67e579a3b00cd5 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Fri, 7 Oct 2022 13:32:49 +0200 Subject: [PATCH] async updates for settings --- src/commands/Project.ts | 2 +- src/dashboardWebView/components/Steps/StepsToGetStarted.tsx | 6 +++--- src/helpers/ContentType.ts | 4 ++-- src/helpers/Extension.ts | 2 +- src/helpers/SettingsHelper.ts | 4 +++- src/listeners/dashboard/SettingsListener.ts | 6 +++--- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/commands/Project.ts b/src/commands/Project.ts index a6303a8d..748bd0bf 100644 --- a/src/commands/Project.ts +++ b/src/commands/Project.ts @@ -37,7 +37,7 @@ categories: [] await Settings.createTeamSettings(); // Add the default content type - Settings.update(SETTING_TAXONOMY_CONTENT_TYPES, [DEFAULT_CONTENT_TYPE], true); + await Settings.update(SETTING_TAXONOMY_CONTENT_TYPES, [DEFAULT_CONTENT_TYPE], true); if (sampleTemplate !== undefined) { await Project.createSampleTemplate(); diff --git a/src/dashboardWebView/components/Steps/StepsToGetStarted.tsx b/src/dashboardWebView/components/Steps/StepsToGetStarted.tsx index a3c48e6c..bb5f67c1 100644 --- a/src/dashboardWebView/components/Steps/StepsToGetStarted.tsx +++ b/src/dashboardWebView/components/Steps/StepsToGetStarted.tsx @@ -163,10 +163,10 @@ export const StepsToGetStarted: React.FunctionComponent ]; React.useEffect(() => { - if (settings.crntFramework) { - setFramework(settings.crntFramework); + if (settings.crntFramework || settings.framework?.name) { + setFramework(settings.crntFramework || settings.framework?.name || null); } - }, [settings.crntFramework]); + }, [settings.crntFramework, settings.framework]); return (