Summary:
- In Gmail all threads /must/ belong to either All Mail, Trash and Spam, and
they are mutually exclusive, so we need to make sure that any add/remove
label operation still guarantees that constraint
- Update ChangeLabelsTask to modify the set of labels to add and remove
based on this rule
- Update tasksFor archiving, moving to trash and moving to spam so they
don't affect any other labels in the thread, as gmail does.
- Removing from view /will/ remove any current labels, but will also
move between all mail and trash as needed
- Remove Inbox, Trash and Spam from the CategoryPicker, as Gmail does
Test Plan: - Unit tests
Reviewers: drew, evan, bengotow
Reviewed By: drew, evan, bengotow
Differential Revision: https://phab.nylas.com/D2715
Summary:
Snooze should wait for categories on all accounts
Fix authPlugin to rembmer `plugin+accountId`, not pluginId, add specs
categories() returned [], categories(acctId) returned {}
dry up sync worker, fetch metadata before anything else
Test Plan: Run tests
Reviewers: drew, juan
Reviewed By: juan
Differential Revision: https://phab.nylas.com/D2693
Summary:
Previously, we have saved drafts back to the user's provider through the sync engine. There are a handful of very serious edge case issues we're working to solve that are creating a bad user experience. (#933, #1175, #1504, #1237)
For now, we're going to change the behavior of N1 to mitagate these issues.
- If you create a draft in N1, we will not sync it to other mail clients while you're working on it.
- If you enable send later, we'll start syncing the draft to the server as before.
- If you created the draft in another client, we'll sync the draft to the server as before.
Fix specs
Test Plan: Run specs
Reviewers: evan, juan
Reviewed By: juan
Differential Revision: https://phab.nylas.com/D2706
Summary:
WIP. I added a collection index to make displaying the threads of a
currently selected participant on the sidebar easy and fast.
The problem is that the `participants` of a thread, while a collection of
`Contact` objects, have no "ids" for those contact objects.
One idea was to create the join table but access contacts by email instead
of id. This required a minor change to the way the data is entered in the
join table.
This means the sidebar can now simply do:
`DatabaseStore.findAll(Thread).where(Thread.attributes.participants.contains('foo@bar.com'))`
While I didn't for this initial test, we could also/instead create the
`Message-Contact` join table. The trick about a Message-Contact table is
that I believe we'd have to create additional columns further specifying
which field we're interested in.
The following two queries:
`DatabaseStore.findAll(Message).where(Message.attributes.to.contains('foo@bar.com'))`
`DatabaseStore.findAll(Message).where(Message.attributes.from.contains('foo@bar.com'))`
would require additional columns in the `Message-Contact` join table
because currently the only columns are `id` and `value`.
In the case of the sidebar use case, I think the Thread participants is
what you want to see anyway.
Unfortunately an email-centric scheme can't distinguish between
`noreply@phab.com <Evan>` and `noreply@phab.com <Juan>`. I actually think
this may be a good thing since I think most people think in terms of email
address as the unique key anyway and for the use case of showing related
emails in the sidebar I'd rather overshow than undershow.
This solution seems to be working pretty well in initial testing, but I
want to see if you guys can think of anything this may subtly screw up
down the line, or if you can think of a simpler way to do this.
Test Plan: todo
Reviewers: juan, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2687