Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shanalikhan committed Jul 18, 2019
1 parent 2d4c0c5 commit 8fb8c0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/service/webview.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,18 @@ export class WebviewService {
}
}

public OpenLandingPage() {
public IsLandingPageEnabled(): boolean {
const dontShowThisAgain = state.context.globalState.get<boolean>(
"landingPage.dontShowThisAgain"
);
if (dontShowThisAgain) {
return;
return false;
} else {
return true;
}
}

public OpenLandingPage() {
const webview = this.webviews[0];
const releaseNotes = require("../../release-notes.json");
const content: string = this.GenerateContent({
Expand Down
6 changes: 4 additions & 2 deletions src/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ export class Sync {
startUpSetting.gist != null && startUpSetting.gist !== "";

if (!startUpCustomSetting.downloadPublicGist && !tokenAvailable) {
state.commons.webviewService.OpenLandingPage();
return;
if (state.commons.webviewService.IsLandingPageEnabled()) {
state.commons.webviewService.OpenLandingPage();
return;
}
}

if (gistAvailable) {
Expand Down

0 comments on commit 8fb8c0e

Please sign in to comment.