diff --git a/js/background.js b/js/background.js index 8d0314f1a..f370ebacc 100644 --- a/js/background.js +++ b/js/background.js @@ -121,8 +121,6 @@ SERVER_URL, SERVER_PORTS, USERNAME, PASSWORD ); - deferredInit.resolve(owsDesktopApp); - if (firstRun === true && textsecure.storage.user.getDeviceId() != '1') { if (!storage.get('theme-setting') && textsecure.storage.get('userAgent') === 'OWI') { storage.put('theme-setting', 'ios'); @@ -301,10 +299,7 @@ }); } - var App = Backbone.Model.extend({ - initialize: function(opts) { - this.inboxView = null; - }, + window.owsDesktopApp = { getAppView: function(destWindow) { var self = this; @@ -327,11 +322,7 @@ } }); } - }); + }; - window.owsDesktopApp = new App(); - - var deferredInit = $.Deferred(); - window.initLoading = deferredInit.promise(); })(); diff --git a/js/index.js b/js/index.js index e94a468fe..9ef3dfdf3 100644 --- a/js/index.js +++ b/js/index.js @@ -17,13 +17,10 @@ function render() { extension.windows.getBackground(function(bg) { - - var inboxPromise = bg.initLoading.done(function(owsDesktopApp) { - owsDesktopApp.getAppView(window).then(function(appView) { - var bodyEl = document.getElementById('signal-container'); - bodyEl.innerHTML = ""; - bodyEl.append(appView.el); - }); + bg.owsDesktopApp.getAppView(window).then(function(appView) { + var bodyEl = document.getElementById('signal-container'); + bodyEl.innerHTML = ""; + bodyEl.append(appView.el); }); }); }