From 632c8c063c26bbd03fc875cb1315b24f9dc90267 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 23 Oct 2017 16:02:49 -0700 Subject: [PATCH] Only start the app up when we've fetched all conversations (#1597) It's a race condition today, and we don't always win the race. --- js/background.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/background.js b/js/background.js index 270ce0657..bfcb05b31 100644 --- a/js/background.js +++ b/js/background.js @@ -63,7 +63,7 @@ } first = false; - start(); + ConversationController.load().then(start, start); }); Whisper.events.on('shutdown', function() { @@ -77,8 +77,6 @@ }); function start() { - ConversationController.load(); - var currentVersion = window.config.version; var lastVersion = storage.get('version'); storage.put('version', currentVersion);