Make getBackground async

This commit is contained in:
lilia 2015-05-11 14:22:15 -07:00
parent a57363f1c0
commit 76e170686a
6 changed files with 198 additions and 175 deletions

View file

@ -16,12 +16,14 @@
*/
(function () {
'use strict';
var bg = extension.windows.getBackground();
window.Whisper = window.Whisper || {};
if (bg.textsecure.storage.user.getNumber() === undefined) {
window.location = '/options.html';
} else {
new bg.Whisper.InboxView().$el.prependTo(bg.$('body',document));
}
extension.windows.getBackground(function(bg) {
if (bg.textsecure.storage.user.getNumber() === undefined) {
window.location = '/options.html';
} else {
new bg.Whisper.InboxView().$el.prependTo(bg.$('body',document));
}
});
}());