Skip to content

Commit

Permalink
Delay Insiders prompt until more activations occur. (#7587)
Browse files Browse the repository at this point in the history
* Delay Insiders prompt until 10 activations occur.
  • Loading branch information
sean-mcmanus authored May 25, 2021
1 parent c2a1a88 commit ee36eab
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Extension/src/LanguageServer/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,15 +603,24 @@ async function installVsix(vsixLocation: string): Promise<void> {
}

async function suggestInsidersChannel(): Promise<void> {
if (util.isCodespaces()) {
// Do not prompt users of Codespaces to join Insiders.
return;
}

const suggestInsiders: PersistentState<boolean> = new PersistentState<boolean>("CPP.suggestInsiders", true);

if (!suggestInsiders.Value) {
return;
}
if (util.isCodespaces()) {
// Do not prompt users of Codespaces to join Insiders.

const suggestInsidersCount: PersistentState<number> = new PersistentState<number>("CPP.suggestInsidersCount", 0);

if (suggestInsidersCount.Value < 10) {
suggestInsidersCount.Value = suggestInsidersCount.Value + 1;
return;
}

let buildInfo: BuildInfo | undefined;
try {
buildInfo = await getTargetBuildInfo("Insiders", false);
Expand Down

0 comments on commit ee36eab

Please sign in to comment.