Commit graph

5 commits

Author SHA1 Message Date
Ben Gotow d0d96f90f5 feat(unread-notifications): Check that unread messages are in inbox
Summary: When we get unread messages, grab their threads and then make sure they're in the inbox before notifying.

Test Plan: See updated specs!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1361
2015-03-27 16:37:13 -07:00
Ben Gotow 5826d0dd37 fix(displayWindow): Don't display on all selection changes, just when clicking notifications 2015-03-27 15:24:26 -07:00
Evan Morikawa 5bcefd23ba feat(notifications): can select a thread from any view
Summary:
The issue was that when selecting a thread id, it was not loaded in the
current list of items in the ThreadList and failing to come up.

The notifications now pass a property that the AccountSidebarStore listens
for to indicate what tag we think is most likely to contain the thread
that we're directly trying to access.

Eventually the correct data set may be loaded that contains the thread we
want. In the meantime, the requested selectedThreadId may or may not
resolve to an actual selectedThread object. If we detect that the
requested thread came into scope, we trigger another action to notify
everyone that the thread is now available. We also pass along a force
flag since this is a case when the requested thread id hasn't changed

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1353
2015-03-26 22:07:31 -04:00
Evan Morikawa 72f1035324 fix(notifications): only show notification for new messages 2015-03-10 16:08:07 -07:00
Ben Gotow c952ea3b12 feat(notifications): Initial pass at new mail notifications
Summary:
Eventually, notification stuff should be moved out of InboxAPI into a separate package, and we should have some documented way of watching for "new" things. (Right now it'd be a bit hard to do on the database store...)

Additional fixes:
- AddRemoveTagsTask now optimistically updates the version. Before it would get the new version from the API response. This was bad because it could still cause local changes to be overwritten if you were changing tags really fast.

- AddRemoveTagsTask now takes a threadId, not a thread for consistency with all the rest of our Tasks

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1214
2015-02-20 12:19:34 -08:00