From 1c70293bba849b98af8e15e84f1e07462e06950e Mon Sep 17 00:00:00 2001 From: lilia Date: Thu, 17 Sep 2015 13:44:44 -0700 Subject: [PATCH] Remove global updateInbox method This operation now needs to be done exactly once, at startup, so we don't need to expose a global method for it. // FREEBIE --- js/background.js | 2 -- js/conversation_controller.js | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/js/background.js b/js/background.js index 78b04b17d..686065623 100644 --- a/js/background.js +++ b/js/background.js @@ -18,8 +18,6 @@ textsecure.protocol_wrapper.startWorker(); - ConversationController.updateInbox(); - extension.onLaunched(function() { storage.onready(function() { if (textsecure.registration.isDone()) { diff --git a/js/conversation_controller.js b/js/conversation_controller.js index a35f36645..2699c7a85 100644 --- a/js/conversation_controller.js +++ b/js/conversation_controller.js @@ -37,6 +37,9 @@ } }))(); + // Load the initial set of models for the inbox. + conversations.fetchActive(); + window.getInboxCollection = function() { return inboxCollection; }; @@ -68,9 +71,6 @@ } }); }); - }, - updateInbox: function() { - conversations.fetchActive(); } }; })();