Skip to content

Commit ee36eab

Browse files
authored
Delay Insiders prompt until more activations occur. (#7587)
* Delay Insiders prompt until 10 activations occur.
1 parent c2a1a88 commit ee36eab

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Extension/src/LanguageServer/extension.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,15 +603,24 @@ async function installVsix(vsixLocation: string): Promise<void> {
603603
}
604604

605605
async function suggestInsidersChannel(): Promise<void> {
606+
if (util.isCodespaces()) {
607+
// Do not prompt users of Codespaces to join Insiders.
608+
return;
609+
}
610+
606611
const suggestInsiders: PersistentState<boolean> = new PersistentState<boolean>("CPP.suggestInsiders", true);
607612

608613
if (!suggestInsiders.Value) {
609614
return;
610615
}
611-
if (util.isCodespaces()) {
612-
// Do not prompt users of Codespaces to join Insiders.
616+
617+
const suggestInsidersCount: PersistentState<number> = new PersistentState<number>("CPP.suggestInsidersCount", 0);
618+
619+
if (suggestInsidersCount.Value < 10) {
620+
suggestInsidersCount.Value = suggestInsidersCount.Value + 1;
613621
return;
614622
}
623+
615624
let buildInfo: BuildInfo | undefined;
616625
try {
617626
buildInfo = await getTargetBuildInfo("Insiders", false);

0 commit comments

Comments
 (0)