Skip to content

Commit

Permalink
fix: use enable unfinished features env var to set enableV4
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonella Sgarlatta committed Oct 6, 2021
1 parent 05b7337 commit 1190ebb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function reloadHiddenFirefoxTab(): boolean {
const startApplication: StartApplication = async function startApplication(
defaultSyncServerHost: string,
bridge: Bridge,
enableUnfinishedFeatures: boolean,
webSocketUrl: string,
) {
if (reloadHiddenFirefoxTab()) {
Expand All @@ -107,6 +108,7 @@ const startApplication: StartApplication = async function startApplication(
.constant('bridge', bridge)
.constant('defaultSyncServerHost', defaultSyncServerHost)
.constant('appVersion', bridge.appVersion)
.constant('enableUnfinishedFeatures', enableUnfinishedFeatures)
.constant('webSocketUrl', webSocketUrl);

// Controllers
Expand Down Expand Up @@ -194,6 +196,7 @@ if (IsWebPlatform) {
(window as any)._default_sync_server,
new BrowserBridge(AppVersion),
(window as any)._websocket_url,
(window as any)._enable_unfinished_features,
);
} else {
(window as any).startApplication = startApplication;
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/startApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import { Bridge } from "./services/bridge";
export type StartApplication = (
defaultSyncServerHost: string,
bridge: Bridge,
enableUnfinishedFeatures: boolean,
webSocketUrl: string,
) => Promise<void>;
3 changes: 2 additions & 1 deletion app/assets/javascripts/ui_models/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export class WebApplication extends SNApplication {
scope: angular.IScope,
defaultSyncServerHost: string,
public bridge: Bridge,
enableUnfinishedFeatures: boolean,
webSocketUrl: string,
) {
super(
Expand All @@ -67,7 +68,7 @@ export class WebApplication extends SNApplication {
[],
defaultSyncServerHost,
AppVersion,
isDev,
enableUnfinishedFeatures,
webSocketUrl,
);
this.$compile = $compile;
Expand Down
4 changes: 3 additions & 1 deletion app/assets/javascripts/ui_models/application_group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export class ApplicationGroup extends SNApplicationGroup {
$timeout: ng.ITimeoutService,
private defaultSyncServerHost: string,
private bridge: Bridge,
private webSocketUrl: string
private enableUnfinishedFeatures: boolean,
private webSocketUrl: string,
) {
super(new WebDeviceInterface($timeout, bridge));
this.$compile = $compile;
Expand Down Expand Up @@ -64,6 +65,7 @@ export class ApplicationGroup extends SNApplicationGroup {
scope,
this.defaultSyncServerHost,
this.bridge,
this.enableUnfinishedFeatures,
this.webSocketUrl,
);
const appState = new AppState(
Expand Down

0 comments on commit 1190ebb

Please sign in to comment.