signal-desktop/js
Scott Nonnenberg 4cba16cb61 Fetch all conversations on startup of app, not on inbox load (#1437)
* Fetch all conversations on startup of app, not on inbox load

A recent change to fetch conversations less didn't take into account all
that can happen in the app without the inbox loaded. That only happens
when the window is shown, and messages can come in with the app in the
background. In that case, the conversation wouldn't have been loaded
from the database, but would be saved to the database anyway, losing
data.

This change fetches all conversations as soon as the the data store is
ready for a fetch. It also introduces failsafe throws to ensure that
synchronous ConversationController accesses don't happen until the
initial fetch is complete. A new getUnsafe() method was required to
account for some of the model setup that happens during that initial
conversation fetch.

Fixes #1428

FREEBIE

* Fix tests: ConversationController.load() required before get()

FREEBIE
2017-09-06 18:18:46 -07:00
..
models Fetch all conversations on startup of app, not on inbox load (#1437) 2017-09-06 18:18:46 -07:00
views Fetch conversations once, clean up ConversationController API (#1420) 2017-09-01 09:10:41 -07:00
background.js Fetch all conversations on startup of app, not on inbox load (#1437) 2017-09-06 18:18:46 -07:00
backup.js Export: Properly generate directory names for nameless groups (#1421) 2017-09-01 07:33:30 -07:00
chromium.js Move clear/drawAttention logging up a level to reduce verbosity 2017-08-28 12:59:08 -07:00
components.js Introduce new filesize dependency 2017-05-09 15:14:20 -07:00
conversation_controller.js Fetch all conversations on startup of app, not on inbox load (#1437) 2017-09-06 18:18:46 -07:00
conversation_panel.js Remove erroneous license file and headers 2015-09-07 14:58:42 -07:00
database.js Cache messages on receipt, remove from cache when processed 2017-08-04 12:03:25 -07:00
debugLog.js Increase log length to 5000, since we're logging so much now 2017-08-04 12:03:25 -07:00
delivery_receipts.js Additional logging when we get delivery receipt for unknown msg 2017-08-23 13:39:29 -07:00
emoji_util.js Bulletproof getCountOfAllMatches against non-global regex input 2017-05-10 15:51:39 -07:00
expire.js Add build support for expiring old releases 2016-04-03 20:55:53 -07:00
expiring_messages.js Fetch all conversations on startup of app, not on inbox load (#1437) 2017-09-06 18:18:46 -07:00
index.js Use appendChild instead of append 2017-04-15 23:46:02 -07:00
keychange_listener.js Fetch conversations once, clean up ConversationController API (#1420) 2017-09-01 09:10:41 -07:00
libphonenumber-util.js Refactor number parsing and validation 2015-12-09 18:58:51 -08:00
libsignal-protocol-worker.js Update libsignal-protocol v1.0.0 2016-06-14 16:27:34 -07:00
libtextsecure.js Fix race handling contact sync with verified info (#1419) 2017-09-01 07:42:41 -07:00
Mp3LameEncoder.min.js Add voice notes 2016-08-23 16:16:31 -07:00
notifications.js Fetch conversations once, clean up ConversationController API (#1420) 2017-09-01 09:10:41 -07:00
options.js Move Whisper.events out of views and tests 2017-04-21 13:21:18 -07:00
panel_controller.js Move clear/drawAttention logging up a level to reduce verbosity 2017-08-28 12:59:08 -07:00
read_receipts.js Read/Delivery Receipts: Wait for resolution in main queue 2017-08-04 12:03:25 -07:00
register.js Fix minor style errors 2016-02-18 13:45:22 -08:00
registration.js Refactor registration event 2016-09-20 13:42:33 -07:00
reliable_trigger.js Apply reliable trigger to Backbone.Collection as well 2017-08-04 12:03:25 -07:00
rotate_signed_prekey_listener.js Remove some global refs to window.events 2017-04-12 20:43:16 -07:00
signal_protocol_store.js isUntrusted: Return false if firstUse is true 2017-08-04 12:03:25 -07:00
storage.js Log on failure to fetch storage 2016-08-11 12:22:32 -07:00
wall_clock_listener.js Remove some global refs to window.events 2017-04-12 20:43:16 -07:00
WebAudioRecorderMp3.js Add voice notes 2016-08-23 16:16:31 -07:00