Skip to content
This repository was archived by the owner on May 22, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let minimist = require('minimist');
// local modules
let Application = require('./src/browser/api/application.js').Application;
let System = require('./src/browser/api/system.js').System;
import { Window } from './src/browser/api/window';
import { create } from './src/browser/api/window';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Considering this file is as huge as it is, I think it's more descriptive to have the Window.create call vs just a plain create call. Can be hard to tell exactly what's being created.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying not to import the whole file here, it helps with circular dependencies on the typescript conversion


let apiProtocol = require('./src/browser/api_protocol');
import socketServer from './src/browser/transports/socket_server';
Expand Down Expand Up @@ -79,7 +79,7 @@ app.on('child-window-created', function(parentBwId, childBwId, childOptions) {
console.warn('failed to add');
}

Window.create(childId, childOptions);
create(childId, childOptions);
});

app.on('select-client-certificate', function(event, webContents, url, list, callback) {
Expand Down
2 changes: 1 addition & 1 deletion src/browser/api/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let _ = require('underscore');

// local modules
let System = require('./system.js').System;
import { Window } from './window';
import * as Window from './window';
let convertOpts = require('../convert_options.js');
import * as coreState from '../core_state';
let externalApiBase = require('../api_protocol/api_handlers/api_protocol_base');
Expand Down
7 changes: 2 additions & 5 deletions src/browser/api/notifications/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ import {
PendingNote
} from './shapes';

// required tor the ts compiler, theses should be made imports eventually
declare var require: any;

const {System} = require('../system');
const {Window} = require('../window');
import * as Window from '../window';
const {Application} = require('../application');
const {sendToIdentity} = require('../../api_protocol/api_handlers/api_protocol_base');
import ofEvents from '../../of_events';
Expand Down Expand Up @@ -128,7 +125,7 @@ ofEvents.on(route.application('window-end-load', '*'), (e: any) => {
try {
Window.close({
uuid,
name: Window.QUEUE_COUNTER_NAME
name: undefined
});
} catch (e) {
writeToLog('info', e);
Expand Down
Loading