Commit Graph

90 Commits (f0895af6dcb23b58cbe58313ce4eb153a29b8ed7)

Author SHA1 Message Date
Daniel Gasienica 246e0ca87b Add note about inline styles 7 years ago
Daniel Gasienica d797ede791 Close lightbox on escape key press 7 years ago
Daniel Gasienica 86da80fd23 Wire up attachment saving 7 years ago
Daniel Gasienica 593976fe21 Extract Backbone Lightbox view module 7 years ago
Daniel Gasienica 2474b42198 Port lightbox icon buttons 7 years ago
Daniel Gasienica 4a5a2cb5c1 Replace Backbone with React lightbox 7 years ago
Daniel Gasienica cb94d09ef9 Rename media gallery items 7 years ago
Daniel Gasienica 5d0469adef Skip loading videos into memory for performance 7 years ago
Daniel Gasienica c6904476f4 Improve `IndexableBoolean` type 7 years ago
Daniel Gasienica 809e34b0f4 Load 50 attachments for media gallery 7 years ago
Daniel Gasienica 0a4be2e0f4 Remove unused `i18n` 7 years ago
Daniel Gasienica 4ce0472b9f Extract `Message.loadWithObjectURL` 7 years ago
Daniel Gasienica 45d89d1e44 Create `UserMessage` type
Describes user visible messages that can have attachments.
7 years ago
Daniel Gasienica 27c4bf90e3 Add `Signal.Backbone` 7 years ago
Daniel Gasienica 825980fbd1 Add `Collection.fetchVisualMediaAttachments` 7 years ago
Daniel Gasienica cad5e417f3 Add `arrayBufferToObjectURL` module 7 years ago
Daniel Gasienica e5d90775d0 Add `MapAsync` type definition 7 years ago
Daniel Gasienica 648a7ab1bb Autoformat using Prettier 7 years ago
Daniel Gasienica e07458d886 Add basic Backbone type definitions 7 years ago
Daniel Gasienica 9d84b2f420 Index messages with attachments using a boolean
When indexing message attachment metadata using numeric indexes such as:

```javascript
{
  conversationId: '+12223334455',
  received_at: 123,
  attachments: […],
  numAttachments: 2,
},
{
  conversationId: '+12223334455',
  received_at: 456,
  attachments: [],
  numAttachments: 0,
}
{
  conversationId: '+12223334455',
  received_at: 789,
  attachments: [],
  numAttachments: 1,
}
```

It creates an index as follows:

```
[conversationId, received_at, numAttachments]
['+12223334455', 123, 2]
['+12223334455', 456, 0]
['+12223334455', 789, 1]
```

This means a query such as…

```
lowerBound: ['+12223334455', 0,                1               ]
upperBound: ['+12223334455', Number.MAX_VALUE, Number.MAX_VALUE]
```

…will return all three original entries because they span the `received_at`
from `0` through `Number.MAX_VALUE`. One workaround is to index booleans using
`1 | undefined` where `1` is included in the index and `undefined` is not, but
that way we lose the ability to query for the `false` value. Instead, we flip
adjust the index to `[conversationId, hasAttachments, received_at]` and can
then query messages with attachments using

```
[conversationId, 1 /* hasAttachments */, 0                /* received_at */]
[conversationId, 1 /* hasAttachments */, Number.MAX_VALUE /* received_at */]
```
7 years ago
Daniel Gasienica c46e1a1519 Move top-level functions to `Signal.Util` 7 years ago
Daniel Gasienica a609c31a57 Style attachment section headers 7 years ago
Daniel Gasienica ae4c74dd5b Skip metadata initialization for `verified-change` messages 7 years ago
Daniel Gasienica b0fefdbb98 Implementing grouping messages by date 7 years ago
Daniel Gasienica 424965f876 🎨 Autoformat code 7 years ago
Daniel Gasienica f367a9b059 Move `private` method below `public` ones 7 years ago
Daniel Gasienica 3d70e46aea Calculate dates in UTC 7 years ago
Daniel Gasienica d7b21ef5dc Render attachments grouped by date 7 years ago
Daniel Gasienica e34347f290 Add `groupMessagesByDate` 7 years ago
Daniel Gasienica 9053b6acfc Remove unused style 7 years ago
Daniel Gasienica 66516fd36a Use short format for dates 7 years ago
Daniel Gasienica 923d5ff088 Add `missingCaseError` function 7 years ago
Daniel Gasienica fc1c3aabf5 Add scaffolding for media gallery 7 years ago
Daniel Gasienica a8be4f2d8d Expose Lodash in style guide 7 years ago
Daniel Gasienica 94ef3bab80 Move test file 7 years ago
Daniel Gasienica 32a3ef518b Render media gallery placeholder panel 7 years ago
Daniel Gasienica f9e4613395 Move TS test for message migration 7 years ago
Daniel Gasienica 867bece952 Add `Message.initializeAttachmentMetadata` 7 years ago
Daniel Gasienica c5352cf26c Separate required from optional `Message` keys 7 years ago
Daniel Gasienica fc12353bb8 Add `Attachment.isVisualMedia` 7 years ago
Daniel Gasienica 47cc701e72 Add `GoogleChrome` module
Helps us determine which media we can natively display / play back in Electron.
7 years ago
Daniel Gasienica 6ff82adf0a Add `MIME.isImage` and `MIME.isVideo` 7 years ago
Daniel Gasienica df2e6e7864 Port `MIME` module to TypeScript 7 years ago
Scott Nonnenberg ef1d568a80
Restore rendering of group update and end session messages
The previous work to refactor bubbles broke rendering for these message
types. :0/
7 years ago
Scott Nonnenberg fdc13d0af3
Fix some tslint errors
I really need to get it running in my editor!
7 years ago
Scott Nonnenberg bd88407b78
iOS theme: Permanant background to attachment part of bubble
(this is to handle a quote making bubble wider, but a narrow image)
7 years ago
Scott Nonnenberg 21713cbce7
Update quotes to render emoji just like normal messages 7 years ago
Scott Nonnenberg 37cac717cb
Use fit: cover for non-square thumbnails, better movie icon
Also: Match Android's X button in the quote composition area
7 years ago
Scott Nonnenberg 12257e1560
MessageView: Show menu w/ 'reply to message' on triple-dot click 7 years ago
Scott Nonnenberg f4d9ab8ba0
Put quote preview in text box for Android, above it in iOS 7 years ago