Make migrations more robust

Occasionally these will fail if they happen to be executed before the
necessary dependencies (storage, ConversationCollection) are declared.

// FREEBIE
This commit is contained in:
lilia 2016-02-12 17:18:36 -08:00
parent 48626ceafb
commit b8602a3b42
2 changed files with 47 additions and 29 deletions

View file

@ -68,6 +68,7 @@
storage.fetch();
storage.onready(function() {
window.dispatchEvent(new Event('storage_ready'));
setUnreadCount(storage.get("unreadCount", 0));
if (textsecure.registration.isDone()) {