Mailspring/internal_packages
Ben Gotow 8f13b71403 fix(notifs): Make sure notifs always have thread references
Summary:
This started as a fix to https://sentry.nylas.com/sentry/edgehill/group/2970/, which was caused by `threads[msg.threadId]?.categoryNamed('inbox') isnt null`, because `undefined isnt null`.

Then I realized that we batch "incoming" messages and threads arbitrarily, and the reason this happened is because the thread and message were split into different delta updates. Previously, notifications would just have been skipped.

Now we call `_onNewMessagesMissingThreads` when threads cannot be found for new messages, and then try to find the threads again in 10 seconds. If we can find them, we simulate a delta call and run them back through the processor. It would have been simpler to call `_onNewMailReceived` again directly, but I want to be 100% sure we never create infinite loops.

Test Plan: Run new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2188
2015-10-28 16:55:35 -07:00
..
account-sidebar fix(ui): better unread count box 2015-10-28 18:50:04 -04:00
attachments fix(files): Not-yet-downloaded files can be opened via double click 2015-10-27 11:05:33 -07:00
category-picker feat(win32): improve button styles for Win 8.1 spec 2015-10-21 12:17:34 -07:00
composer rm(composer): Dead code related to Scribe / Bower 2015-10-27 11:38:39 -07:00
composer-signature feat(work): Create the "Work" window, move TaskQueue, Nylas sync workers 2015-08-27 16:39:40 -07:00
composer-spellcheck fix(spellcheck): Fix dead code, resolve Sentry 3594 2015-10-22 16:08:03 -07:00
events fix(event): remove EventStore 2015-10-22 14:14:58 -07:00
feedback fix(feedback): Links should open in the user's default browser 2015-10-22 11:34:51 -07:00
inbox-contact-elements fix(drafts): fix illegal ID set 2015-08-31 15:21:41 -07:00
message-list fix(message-list): Clicking Archive or Trash should pop back to the thread list 2015-10-23 15:21:37 -07:00
mode-switch feat(tooltip): use native tooltip style 2015-10-21 11:27:57 -07:00
notification-mailto fix(notifications): Buttons always triggered default action 2015-10-28 10:47:44 -07:00
notification-update-available fix(notifications): Buttons always triggered default action 2015-10-28 10:47:44 -07:00
notifications fix(notifications): Buttons always triggered default action 2015-10-28 10:47:44 -07:00
onboarding fix(onboarding): Check code format before hitting API 2015-10-27 16:43:07 -07:00
plugins fix(plugins): Packages => Plugins in a few more places 2015-10-23 15:14:44 -07:00
preferences fix(prefs): Fix overflow of account names. #175 2015-10-26 10:47:47 -07:00
search-bar fix(search): New X, focus styling for search 2015-10-27 11:28:11 -07:00
sidebar-fullcontact fix(message-sidebar): New ContactCard injectable role, updated FocusedContactStore 2015-09-24 18:58:53 -07:00
thread-list fix(ui): better unread count box 2015-10-28 18:50:04 -04:00
tooltip feat(tooltip): use native tooltip style 2015-10-21 11:27:57 -07:00
ui-dark Setup styles for dropdown (select) control 2015-10-21 21:27:53 +03:00
ui-light fix(fonts): update fonts and styles 2015-10-01 17:55:11 -07:00
undo-redo fix(undo-redo): Fix "undo" button clickability, improve animation 2015-10-23 15:03:12 -07:00
unread-notifications fix(notifs): Make sure notifs always have thread references 2015-10-28 16:55:35 -07:00
worker-sync fix(specs): ContactStore spec fixes for new contact ranking support 2015-10-09 13:42:24 -07:00
worker-ui fix(tasks): don't continue if dependent task fails 2015-10-21 10:33:43 -07:00