fix: use enable unfinished features env var to set enableV4

This commit is contained in:
Antonella Sgarlatta
2021-10-06 16:35:43 -03:00
parent 05b7337876
commit 1190ebbe41
4 changed files with 9 additions and 2 deletions

View File

@@ -89,6 +89,7 @@ function reloadHiddenFirefoxTab(): boolean {
const startApplication: StartApplication = async function startApplication( const startApplication: StartApplication = async function startApplication(
defaultSyncServerHost: string, defaultSyncServerHost: string,
bridge: Bridge, bridge: Bridge,
enableUnfinishedFeatures: boolean,
webSocketUrl: string, webSocketUrl: string,
) { ) {
if (reloadHiddenFirefoxTab()) { if (reloadHiddenFirefoxTab()) {
@@ -107,6 +108,7 @@ const startApplication: StartApplication = async function startApplication(
.constant('bridge', bridge) .constant('bridge', bridge)
.constant('defaultSyncServerHost', defaultSyncServerHost) .constant('defaultSyncServerHost', defaultSyncServerHost)
.constant('appVersion', bridge.appVersion) .constant('appVersion', bridge.appVersion)
.constant('enableUnfinishedFeatures', enableUnfinishedFeatures)
.constant('webSocketUrl', webSocketUrl); .constant('webSocketUrl', webSocketUrl);
// Controllers // Controllers
@@ -194,6 +196,7 @@ if (IsWebPlatform) {
(window as any)._default_sync_server, (window as any)._default_sync_server,
new BrowserBridge(AppVersion), new BrowserBridge(AppVersion),
(window as any)._websocket_url, (window as any)._websocket_url,
(window as any)._enable_unfinished_features,
); );
} else { } else {
(window as any).startApplication = startApplication; (window as any).startApplication = startApplication;

View File

@@ -3,5 +3,6 @@ import { Bridge } from "./services/bridge";
export type StartApplication = ( export type StartApplication = (
defaultSyncServerHost: string, defaultSyncServerHost: string,
bridge: Bridge, bridge: Bridge,
enableUnfinishedFeatures: boolean,
webSocketUrl: string, webSocketUrl: string,
) => Promise<void>; ) => Promise<void>;

View File

@@ -55,6 +55,7 @@ export class WebApplication extends SNApplication {
scope: angular.IScope, scope: angular.IScope,
defaultSyncServerHost: string, defaultSyncServerHost: string,
public bridge: Bridge, public bridge: Bridge,
enableUnfinishedFeatures: boolean,
webSocketUrl: string, webSocketUrl: string,
) { ) {
super( super(
@@ -67,7 +68,7 @@ export class WebApplication extends SNApplication {
[], [],
defaultSyncServerHost, defaultSyncServerHost,
AppVersion, AppVersion,
isDev, enableUnfinishedFeatures,
webSocketUrl, webSocketUrl,
); );
this.$compile = $compile; this.$compile = $compile;

View File

@@ -29,7 +29,8 @@ export class ApplicationGroup extends SNApplicationGroup {
$timeout: ng.ITimeoutService, $timeout: ng.ITimeoutService,
private defaultSyncServerHost: string, private defaultSyncServerHost: string,
private bridge: Bridge, private bridge: Bridge,
private webSocketUrl: string private enableUnfinishedFeatures: boolean,
private webSocketUrl: string,
) { ) {
super(new WebDeviceInterface($timeout, bridge)); super(new WebDeviceInterface($timeout, bridge));
this.$compile = $compile; this.$compile = $compile;
@@ -64,6 +65,7 @@ export class ApplicationGroup extends SNApplicationGroup {
scope, scope,
this.defaultSyncServerHost, this.defaultSyncServerHost,
this.bridge, this.bridge,
this.enableUnfinishedFeatures,
this.webSocketUrl, this.webSocketUrl,
); );
const appState = new AppState( const appState = new AppState(