Skip to content

Commit cdfdaf6

Browse files
authored
fix walkthrough exp (#709)
Signed-off-by: Yan Zhang <[email protected]>
1 parent 9cb9059 commit cdfdaf6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function initializeExtension(_operationId: string, context: vscode.Extensi
4949
const config = vscode.workspace.getConfiguration("java.help");
5050

5151
// for control group where walkthrough is not enabled, present first view for once.
52-
const walkthroughEnabled = isWalkthroughEnabled();
52+
const walkthroughEnabled = await isWalkthroughEnabled();
5353
if (walkthroughEnabled === false && !context.globalState.get(KEY_IS_WELCOME_PAGE_VIEWED)) {
5454
presentFirstView(context);
5555
context.globalState.update(KEY_IS_WELCOME_PAGE_VIEWED, true)

src/utils/walkthrough.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { TreatmentVariables } from "../exp/TreatmentVariables";
77

88
export function isWalkthroughEnabled() {
99

10-
const fromExp = getExpService().getTreatmentVariable<boolean>(TreatmentVariables.VSCodeConfig, TreatmentVariables.JavaWalkthroughEnabled);
10+
const fromExp = getExpService()?.getTreatmentVariableAsync<boolean>(TreatmentVariables.VSCodeConfig, TreatmentVariables.JavaWalkthroughEnabled, true /* checkCache */) ?? false;
1111
// can be overridden by local settings "experiments.override.gettingStarted.overrideCategory.vscjava.vscode-java-pack#javaWelcome.when": "true"
1212
const fromSettings = workspace.getConfiguration("experiments.override.gettingStarted.overrideCategory").get<string>("vscjava.vscode-java-pack#javaWelcome.when") === "true";
1313

0 commit comments

Comments
 (0)