Although some word-wrapping may look better at 800px, it looks much worse
when we can't properly display html emails that are meant for a wider area.
It also just seems a little weird to limit our users in this way.
This is a temporary fix which adds defensive code to prevent duplicate results
from being returned from the thread search query which causes N1 to enter a loop
and freeze (#3001).
Duplicate results from the search query likely indicate that a thread
was indexed twice, which was not the case before. The cause for this is
still at large.
Summary: Adds option to view preview thumbnails for attachments. This commit updates the FileDownloadStore to generate file thumbnail previews for attachments via `qlmanage` and displays them in the AttachmentItem component.
Test Plan: Manual
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D3393
Decaffination replaces someString[index..-1] with
someString.slice(index, -1 + 1), which is bizzare. This commit changes those
instances to someString.slice(index).
There are cases where the documentElement has a scrollHeight of 0, even if
the body has a larger scrollHeight. Before, we were always using the
documentElement if it was present. Now, we use the maximum scrollHeight.
This commit fixes a bug in which you couldn't shift select threads from
the bottom to the top (i.e. select a thread, shift-click a thread on top of it
would not select the range of threads).
This bug was introduced by a translation from coffeescript to JS.
Specifically, by converting
```
for idx in [startIdx..endIdx]
```
to
```
for (let idx = startIdx; idx <= endIdx; idx++) { ... }
```
The coffeescript range syntax for `[x..y]` automatically generates the
correct range when x > y or when x < y, generating a descending or
ascending range respectively.
However, our transaltion simply iterated ascendingly from `startIdx`
to `endIdx`, which would be a no-op when the `startIdx` was greater than
the `endIdx`, which was the case when shift-selecting threads from bottom to top.