Skip to content

Commit

Permalink
scm: enable preview for insiders
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Feb 22, 2017
1 parent 7db214b commit d744666
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/vs/workbench/parts/scm/browser/scmPreview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,19 @@ import { TPromise } from 'vs/base/common/winjs.base';
import { IWindowService } from 'vs/platform/windows/common/windows';
import { IMessageService } from 'vs/platform/message/common/message';

// tslint:disable
import pkg from 'vs/platform/node/package';
// tslint:enable

// Enable this by default for insiders
function getDefaultValue(): boolean {
const value = window.localStorage.getItem('enablePreviewSCM');
return /insider$/.test(pkg.version) ? value !== 'false' : value === 'true';
}

export default class SCMPreview {

private static readonly _enabled = window.localStorage.getItem('enablePreviewSCM') === 'true';
private static readonly _enabled = getDefaultValue();

static get enabled(): boolean {
return this._enabled;
Expand Down

0 comments on commit d744666

Please sign in to comment.