Commit Graph

1436 Commits

Author SHA1 Message Date
lilia d4e0c11ebc Show a hint on startup if the inbox is empty
Fixes #403

// FREEBIE
2015-11-27 11:36:46 -08:00
lilia 61439a886f Validate json responses
Perform lightweight validation on json responses from the server. Ensure
that the attributes we depend on have the right type.

// FREEBIE
2015-11-25 12:16:36 -08:00
lilia b0d4370c2c Remove unused variable
// FREEBIE
2015-11-25 11:42:16 -08:00
lilia ea87062d92 Post debug logs as non public gists
// FREEBIE
2015-11-25 10:28:30 -08:00
lilia 07702c4ee5 Let the application layer send sync messages
Previously, libtextsecure would send a sync message automatically
when appropriate. This fails if any recipient has a key conflict
or if our network connection fails mid-send.

Instead, when appropriate, return a the DataMessage encoded as an array
buffer for later syncing. This lets the application choose when to send
it, which we now do after any successful send to a recipient, rather
than after all recipients are successfully sent to.

Eventually we should move the DataMessage protobuf construction and
group sending logic to the application layer entirely, in which case
we wouldn't need libtextsecure to construct the sync message either.

Fixes #408
2015-11-24 17:11:03 -08:00
lilia 5c37c3d6ce Change return type from sending messages
Pass the whole result from the outgoing message callback on to the
caller, and preserve the names of the members.

// FREEBIE
2015-11-24 17:05:25 -08:00
lilia 7b6820d2ac Refactor messageSender/OutgoingMessage
Move encrypt and transmit to OutgoingMessage
Restore per-number queueing to messageSender

// FREEBIE
2015-11-24 17:05:24 -08:00
lilia adf8445b85 Populate registrationIds on deviceObjects
Saves us from doing so later.

// FREEBIE
2015-11-24 17:05:23 -08:00
lilia cf85c5e25e Fix key conflict with self after master device re-install
Fix bug where re-installing would cause sync messages to fail and
produce unresolvable error indicators on messages that were actually
sent.

// FREEBIE
2015-11-24 16:20:07 -08:00
lilia 4cc6b1ff9a Validate attachment urls
// FREEBIE
2015-11-24 16:20:07 -08:00
lilia f977827483 Use secure endpoints for dependencies
And for good measure, pin the commit we're using so that future builds
produce the same result.

// FREEBIE
2015-11-23 16:26:54 -08:00
lilia f006bd9ddc Update libaxolotl
Removes webcrypto, fixes padding calc

// FREEBIE
2015-11-23 16:13:32 -08:00
lilia 29977beeaf Remove cryptojs
This dependency is left over from libaxolotl's webcrypto polyfill.

// FREEBIE
2015-11-23 16:13:32 -08:00
lilia 36f3bc5002 Add minimum chrome version
Chrome 37 and higher should support the native SubtleCrypto api, which
allows us to remove the cryptojs polyfill from libaxolotl.

// FREEBIE
2015-11-23 16:13:32 -08:00
lilia 50602fb8e5 Remove unnecessary jquery insertion
This element is rendered in place already.

// FREEBIE
2015-11-23 16:13:31 -08:00
lilia 2457d51fd4 Ignore search queries that are all whitespace
// FREEBIE
2015-11-23 11:37:55 -08:00
lilia 73ab95b8a3 Serialize search queries
Fixes #395

// FREEBIE
2015-11-20 16:11:41 -08:00
lilia 798d1a4212 Remove missing js include
// FREEBIE
2015-11-20 16:11:41 -08:00
lilia 4358a46ac4 Remove unused file // FREEBIE 2015-11-20 14:17:58 -08:00
lilia 24e1939640 Update install copy
// FREEBIE
2015-11-20 14:03:02 -08:00
lilia 1892eeafe0 Simplify meta/timestamp styles
// FREEBIE
2015-11-20 13:21:13 -08:00
lilia ed32801c3e Reset unreadCounts
Add a migration to reset bad unreadCounts from previously broken
unreadCount tracking. This will execute exactly once per installation.

// FREEBIE
2015-11-19 17:27:24 -08:00
lilia 31b29b67f2 Don't let unreadCount become negative
If you had an inaccurate unread count due to previously broken unread
tracking, it's possible to go negative and never fully recover. Fixed
by clamping to zero.

// FREEBIE
2015-11-19 10:47:50 -08:00
OdysseasKr 83298b8979 Mark conversation as read if open and window focused
Messages that are received in the active conversation while the window
is focused, are automatically marked as read.

The conversation appears as unread for a split second as the incoming message
arrives but it gets marked as read as soon as the message is displayed.
2015-11-19 10:40:07 -08:00
ody 86edcc06c2 Add updating of window title on launch
The window title show the number of global unread messages when the
inbox window launches.
2015-11-19 10:40:07 -08:00
ody 156c7c3b3d Add unread count in window title
The window title now shows the global number of unread messages as
"Signal (1)". This way the user can see the number of unread messages
in the task bar and when alt-tabbing.

Resolves: #384
2015-11-19 10:40:07 -08:00
ody 8c59862e3d Fix global unread message counting
Fixed the global counting of unread messages. This makes the "unreadCount"
variable in storage to stay in sync with the sum of unread messages in each
conversation. To achieve this, the controller_view updates the global
variable whenever messages are received or read.
2015-11-19 10:40:02 -08:00
lilia 641a7dbc6d Update libaxolotl
encryptMessageFor now requires an array buffer instead of a protobuf.

By converting the message to an array buffer outside the Promise.all, we
avoid allocating a new copy for each device.

// FREEBIE
2015-11-17 16:58:31 -08:00
lilia 4615e730ca Save ReferenceErrors on messages
// FREEBIE
2015-11-17 16:22:30 -08:00
lilia 765668b3d3 Clear message collections when the window is closed
We don't need to keep them in memory if we're done viewing them,
plus it avoids having to re-render a large collection when we re-open a
conversation. Now that we only load a sensible number of messages at a
time, caching them between usages is less valuable. Removing them from
the collection should free them for garbage collection.

// FREEBIE
2015-11-16 16:38:12 -08:00
lilia 2fc78ddd7d Fix scroll position jumping when images load
Messages with images or media were causing the scroll position to jump
around when they loaded, because rendering them changed the height of their
elements from 0 to full-height sometime after they were inserted into
the DOM.

Now when rendering attachments, we wait for them to load so they can
render at full height immediately, then warn our parent message list
before and after a potential height change, so the scroll position can
be saved and reset.

// FREEBIE
2015-11-15 15:32:35 -08:00
lilia 2ee8cae8d4 Move some initial setup to the 'opened' event
Avoid inbox views digging too deep into conversation views.

// FREEBIE
2015-11-15 14:59:21 -08:00
lilia 2861fa26a7 Implement infinite scrolling message lists
Only load the most recent messages when initially rendering a
conversation. Scrolling to the top of a message list loads older
messages.

This required some slight refactoring of how we insert message elements
into the dom. If the message is added to the end of the collection,
append it at the end. Otherwise, assume it is an older message and
prepend it.

When adding elements to the top, reset the scrollPosition to its
previous distance from scrollHeight. This keeps the current set of
elements fixed in the viewport.

// FREEBIE
2015-11-15 14:56:58 -08:00
lilia abf402b8c5 Terminate cursor cleanly when using limit and index
Add db adapter support for clean cursor termination when passing
options.index and options.limit together. Previously this would cause a
crash because options.conditions was undefined.

// FREEBIE
2015-11-15 14:56:58 -08:00
lilia 987c067355 Remove unused styles
// FREEBIE
2015-11-15 14:56:57 -08:00
codedust 5e255e9df0 Remove 'Textsecure' from error message in api.js 2015-11-13 16:07:49 -08:00
lilia 70bde5f4fa Update libaxolotl
// FREEBIE
2015-11-13 14:01:19 -08:00
lilia d8318ba9bd Remove the gradient
// FREEBIE
2015-11-12 12:58:14 -08:00
lilia 393e3e1e2b Fix unread badge for longer numbers
For 2 or more digit numbers, allow the badge to expand to fit.

// FREEBIE
2015-11-12 12:54:08 -08:00
lilia 43ca92948b Change search box placeholder
Hopefully this makes it more obvious what to do immediately post-install.

// FREEBIE
2015-11-12 12:54:07 -08:00
lilia 4418be19d4 Update conversation header avatar if it changes
// FREEBIE
2015-11-12 12:10:54 -08:00
lilia a8e02a94be Tweak selected state
// FREEBIE
2015-11-12 12:10:54 -08:00
lilia 832f7ab643 Limit max widths of various elements
Bubbles are limited to 30em to facilitate comfortable reading length.
The width of the message list is limited to aid visual threading
of the conversation. The overall layout is restricted to 1300px and
centered if the window is much wider.

The header avatar resizes responsively to save room when the window
gets narrow

// FREEBIE
2015-11-12 11:05:22 -08:00
lilia 596188a630 Fix protocol version check
Fixes #392

// FREEBIE
2015-11-09 16:59:53 -08:00
lilia 16dc7abe69 Display unreadCount badges in conversation list
// FREEBIE
2015-11-09 16:59:52 -08:00
lilia f860278b89 Add avatars to conversation headers
So as not to look repetitive, hide the per-message avatars in one-on-one
conversations.

// FREEBIE
2015-11-09 11:48:14 -08:00
lilia 86d5ac7ef9 Add missed css recompile
// FREEBIE
2015-11-09 11:41:44 -08:00
lilia 7feb55c7d0 Fix twitter link in install flow
Fixes #400

// FREEBIE
2015-11-09 08:35:27 -08:00
lilia 0d5291acad Replace sinewave with ellipse
Also make sure status indicator matches timestamp color.

Fixes #393

// FREEBIE
2015-11-08 14:50:34 -08:00
lilia 20901e69fb Better anti-aliasing on red error mark
// FREEBIE
2015-11-08 14:50:00 -08:00