bootstrap async
This commit is contained in:
parent
e90476af2b
commit
72ac90157f
|
@ -4,7 +4,7 @@ import i18nService from './services/i18nService.js';
|
||||||
window.forge = require('node-forge');
|
window.forge = require('node-forge');
|
||||||
window.tldjs = require('tldjs');
|
window.tldjs = require('tldjs');
|
||||||
|
|
||||||
window.bg_isBackground = true;
|
const bg_isBackground = window.bg_isBackground = true;
|
||||||
window.bg_main = new MainBackground(new i18nService());
|
const bg_main = window.bg_main = new MainBackground(new i18nService());
|
||||||
require('./scripts/analytics.js');
|
require('./scripts/analytics.js');
|
||||||
window.bg_main.bootstrap();
|
bg_main.bootstrap();
|
||||||
|
|
|
@ -82,7 +82,7 @@ export default class MainBackground {
|
||||||
opr.sidebarAction : (window as any).chrome.sidebarAction;
|
opr.sidebarAction : (window as any).chrome.sidebarAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap() {
|
async bootstrap() {
|
||||||
// Chrome APIs
|
// Chrome APIs
|
||||||
if (chrome.commands) {
|
if (chrome.commands) {
|
||||||
chrome.commands.onCommand.addListener((command: any) => {
|
chrome.commands.onCommand.addListener((command: any) => {
|
||||||
|
@ -323,11 +323,10 @@ export default class MainBackground {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bootstrap
|
// Bootstrap
|
||||||
this.environmentService.setUrlsFromStorage().then(() => {
|
await this.environmentService.setUrlsFromStorage();
|
||||||
this.setIcon();
|
this.setIcon();
|
||||||
this.cleanupLoginsToAdd();
|
this.cleanupLoginsToAdd();
|
||||||
this.fullSync(true);
|
this.fullSync(true);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private completeAuthRequest(details: any) {
|
private completeAuthRequest(details: any) {
|
||||||
|
|
Loading…
Reference in New Issue