Commit Graph

473 Commits (cb1d67be648064ebf6ebe84b3c32298e7458313b)

Author SHA1 Message Date
Daniel Gasienica 5d230d3778 Add `Settings.isNotificationGroupingSupported`
See: https://github.com/electron/electron/issues/11189
8 years ago
Daniel Gasienica ecf23b6b2e Disable audio notifications on Windows 7 and lower 8 years ago
Daniel Gasienica a102016ed8 Port `Settings` and `OS` to TypeScript 8 years ago
Daniel Gasienica 87d374ea78 Remove `@prettier` pragmas 8 years ago
Daniel Gasienica 1dd87ad197 Format all source code using Prettier 8 years ago
Daniel Gasienica b74b761255 Implement click to save for document list 8 years ago
Daniel Gasienica 4a5e61eaf4 Implement `Attachment.save` 8 years ago
Daniel Gasienica f36f206a01 Use `IndexablePresence` for `hasFileAttachments` and `hasVisualMediaAttachments`
Reduces index size, makes it easier to debug using IndexedDB inspector, and
hopefully improves lookup performance.
8 years ago
Daniel Gasienica fca8de16c8 Add required `Message.id: string` 8 years ago
Daniel Gasienica 8b9516de72 Update test for attachment metadata 8 years ago
Daniel Gasienica 45d89d1e44 Create `UserMessage` type
Describes user visible messages that can have attachments.
8 years ago
Daniel Gasienica 648a7ab1bb Autoformat using Prettier 8 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 */]
```
8 years ago
Daniel Gasienica b0fefdbb98 Implementing grouping messages by date 8 years ago
Daniel Gasienica 424965f876 🎨 Autoformat code 8 years ago
Daniel Gasienica 3d70e46aea Calculate dates in UTC 8 years ago
Daniel Gasienica e34347f290 Add `groupMessagesByDate` 8 years ago
Daniel Gasienica 94ef3bab80 Move test file 8 years ago
Daniel Gasienica 44debd123d Add basic implementation of `Conversation.updateFromLastMessage` 8 years ago
Daniel Gasienica 55fc21505e Rename `ts/test` to `ts/styleguide` 8 years ago
Scott Nonnenberg 96bd90a4e0
Simplify assignment; add warning to preload.js about Style Guide 8 years ago
Scott Nonnenberg 05303233fb
window.Signal.React -> window.Signal.Components 8 years ago
Scott Nonnenberg 23537546fe
Big refactor: ts/ directory for all typescript, including react
Split out test-specific and general utility react components too.

And moved our test/legacy* files for the Style Guide into a styleguide/
subdirectory of test/.

I think we'll be able to live in this directory structure for a while.
8 years ago