From 0b31823989ea83171774e1a7fbda36de3c7e08e0 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 20 May 2015 14:24:44 -0700 Subject: [PATCH] Wait for storage on launch --- js/panel_controller.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/js/panel_controller.js b/js/panel_controller.js index 1468308b..95582fa9 100644 --- a/js/panel_controller.js +++ b/js/panel_controller.js @@ -141,11 +141,13 @@ }; extension.onLaunched(function() { - if (textsecure.registration.isDone()) { - openInbox(); - } else { - extension.install(); - } + storage.onready(function() { + if (textsecure.registration.isDone()) { + openInbox(); + } else { + extension.install(); + } + }); }); // make sure windows are cleaned up on close