/**
 * Mailvelope - secure email with OpenPGP encryption for Webmail
 * Copyright (C) 2012-2017 Mailvelope GmbH
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License version 3
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import {initBrowserRuntime, initNativeMessaging} from './lib/browser.runtime';
import {init as initModel} from './modules/pgpModel';
import {init as initKeyring} from './modules/keyring';
import {initController} from './controller/main.controller';
import {initScriptInjection} from './lib/inject';

async function main() {
  initBrowserRuntime();
  await initModel();
  await initNativeMessaging();
  await initKeyring();
  initController();
  initScriptInjection();
}

main();

/**
 * Mailvelope - secure email with OpenPGP encryption for Webmail
 * Copyright (C) 2012-2017 Mailvelope GmbH
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License version 3
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import {initBrowserRuntime, initNativeMessaging} from './lib/browser.runtime';
import {init as initModel} from './modules/pgpModel';
import {init as initKeyring} from './modules/keyring';
import {initController} from './controller/main.controller';
import {initScriptInjection} from './lib/inject';

async function main() {
  initBrowserRuntime();
  initController();
  await initModel();
  await initNativeMessaging();
  await initKeyring();
  initScriptInjection();
}

main();

Enable event handling before keyring is loaded
Enable event handling before keyring is loaded
