Commit Graph

165 Commits (1775e97bcd64268a9835531cd0156cc31087808a)

Author SHA1 Message Date
Scott Nonnenberg b60b20bde4 Mark messages read only when visible, on receipt, focus, scroll
- Only mark messages read when scrolling if in focus and visible
- Remove last seen indicator when scrolling to the bottom with scroll
  down button
- Update last seen indicator when we don't already have one and we're
  scrolled up.

FREEBIE
8 years ago
Scott Nonnenberg 10c2874d19 Fix race condition: Pull from database after add to conversation
Also add some console logs to help us determine whether this ever
happens to people in the wild.

FREEBIE
8 years ago
Scott Nonnenberg 30b7bf23db Recursively fetch messages until we've loaded all unread
FREEBIE
8 years ago
lilia aed5735620 Improve keychange notice reliability/perf
Bind a single listener to keychange events from the storage interface,
which then looks up relevant conversations and adds notices to them,
with tests.

Previously we would need to instantiate a conversation model in order to
start listening to its key change events. In practice this usually
happens at startup but we shouldn't rely on it, and it incurs higher
overhead since it creates a different listener for each conversation.

// FREEBIE
8 years ago
lilia 787c393e1b Log key change advisory creation
// FREEBIE
8 years ago
lilia 8aa2f771a7 Remove self-listener in conversation model
Since there is the only source/listener on this event, it can be called
directly.

// FREEBIE
8 years ago
Sam Vevang ed4991974b set up a new view for displaying the network status
// FREEBIE
8 years ago
lilia ace59147ab Reduce unnecessary updates on conversations at startup 8 years ago
lilia 6509646bdb Set expireTimer to null to unset
// FREEBIE
8 years ago
lilia e648a4b095 Revert "Remove unregistered group members"
This reverts commit a768b94471.

d2ddfc7 was enough to fix #989. Removing unregistered members from the
group (as opposed to silently ignorning them) creates greater potential
for getting out of sync with the member lists on other devices.

// FREEBIE
8 years ago
haffenloher a768b94471 Remove unregistered group members
Locally remove unregistered users from group membership lists.

Fixes #989
Related to Whispersystems/Signal-Android#6175
Closes #1052

// FREEBIE
8 years ago
lilia 9ef61d43f4 Update conversation lastMessage from database
Don't set lastMessage, let it update itself as needed, such as when
first rendering a conversation list item, and when its messages are
sent, received, or destroyed.
8 years ago
lilia 6253269d19 Tweak key change advisory insertion
Let received_at be the current time for keychanges. This avoids them
being inserted in the wrong place in the thread.

Use the newmessage event to trigger frontend listeners to add them to
the conversation view if it is open.
8 years ago
lilia d7f241ddee Use correct type on timer updates 8 years ago
lilia 05ed7c3822 Merge timer update functions 8 years ago
lilia 0854b19371 Revert "Don't load group contacts unnecessarily"
This reverts commit 6699571910.

Not quite ready for primetime.
9 years ago
lilia 6699571910 Don't load group contacts unnecessarily
There are some cases when we want to initialize a group object without
loading its contacts, such as while processing delivery receipts. We
really only need to load the contacts for a group/convo when we are
rendering it, so let the front end handle those cases (which most of
them do already).
9 years ago
lilia 03c5d12edd Fix necrobumping convos on key change
When inserting key change advisories, use the current conversation
timestamp to avoid pushing lots of old groups to the top of the
conversation list.
9 years ago
lilia f8a3ae158c Remove log message 9 years ago
lilia 7fe708d195 Insert keychange advisories
On click, these open a verification panel for the relevant contact,
within this conversation.

// FREEBIE
9 years ago
lilia 009098f8dd Insert inferred timer updates before the corresponding message 9 years ago
lilia a12569e356 Fix destination on synced timer updates 9 years ago
lilia 56aee5e8ef Update conversation snippets automatically
Fixes stale snippets after the message has expired
9 years ago
lilia 6074a29046 Send timer update messages when changing the timer 9 years ago
lilia 824b7417e9 Apply expireTimer to outgoing messages 9 years ago
lilia 2b2c6ab040 Frontend for timer updates and timer indicator 9 years ago
lilia 4cd2c03687 Add clock svg style 9 years ago
lilia 1383dc141f Ensure that expired messages are removed from the frontend 9 years ago
lilia 96fd017890 Support for incoming expiring messages
When initialized, or when expiration-related attributes change, expiring
messages will set timers to self-destruct. On self-destruct they trigger
'expired' events so that frontend listeners can clean up any collections
and views referencing them.

At startup, load all messages pending expiration so they can start their
timers even if they haven't been loaded in the frontend yet.

Todo: Remove expired conversation snippets from the left pane.
9 years ago
lilia edd6f58539 Update display when contact colors change
// FREEBIE
9 years ago
lilia 53f20640af Add support for syncing colors
// FREEBIE
9 years ago
lilia 7b9894d688 Refactor css to support theming
Move away from inline style attributes for setting contact colors.
Apply colors by name via css classes instead. Also lays groundwork
for syncing contact colors.

// FREEBIE
9 years ago
lilia 8939c61c7c Log on notification removal
// FREEBIE
9 years ago
lilia 7caecc564d Process all incoming conflicts before outgoing ones
Fixes a session management problem where, after resolving a conflict
with some contact, that contact would get bad mac as a result of us
sending them a new prekey message before processing a pending conflicted
prekey message received from them earlier.

Fixes #806

// FREEBIE
9 years ago
lilia 148bd32671 Update libsignal-protocol v0.10.0
* Changes policy for old session deletion
* Renames putIdentityKey to saveIdentity
* Remove device messages

// FREEBIE
9 years ago
lilia 1d60dc38fb Rename axolotl storage
// FREEBIE
9 years ago
lilia d1e9534542 Refactor delivery receipt tracking
Move code for matching receipts to messages (and vice versa) to its own
file.

// FREEBIE
9 years ago
lilia 18012688ea Log unread message timestamps
// FREEBIE
9 years ago
lilia 07a0463b65 Fix conversation list self-resorting
When deleting all messages in a conversation, the entry in the left pane
should be inserted into the alphabetical portion of the list. To keep it
in this collection, do not nullify active_at.

To ensure the list view is keeping itself correctly sorted, make sure
that resorting behavior is triggered any time a relevant attribute is
changed.

This fixes deleted conversations jumping to the top of the list, and
conversation order scrambling when getting a group or contact sync
message from our master device.

Fixes #734

// FREEBIE
9 years ago
lilia 234f937bc7 Conversation subscreens share a header
// FREEBIE
9 years ago
lilia c8aa2246dc Let groups have blue headers
// FREEBIE
9 years ago
lilia 18a5ce8e54 Restyle conversation panel
// FREEBIE
9 years ago
lilia 8b3596b956 Delete last timestamp on a convo when deleting messages
// FREEBIE
9 years ago
lilia 6f3f33657a Don't mark read on sync messages
There's no longer a need for this since we have read-state syncing.

// FREEBIE
9 years ago
lilia 762cb68721 Serialize sending and adding messages to a convo
Previously, if a message was sent in between the receive time of an
incoming message and the time it is actually added to the conversation's
message collection (which only occurs later after several async
callbacks), the incoming message would be inserted not-at-the-end of the
collection since it is ordered by receive time. This tricked the front
end into assuming the message was an older message instead of a new one.

Fixes #490

// FREEBIE
9 years ago
lilia 67900753d1 Log sending read receipts
// FREEBIE
9 years ago
lilia 0763cf14a3 Remove messages from notifications when read
Remove individual messages from Notifications when marked read.
Previously this was only done from the conversation model when marking
the entire conversation as read.

Fixes #717

// FREEBIE
9 years ago
lilia 2b7cbef8b1 Rename a function
Avoid confusing this operation with actual receipts, which are something
else.

// FREEBIE
9 years ago
lilia b77d5df4f2 Fix markRead when messages have not been loaded yet
Query the database and not just the in-memory messages.

// FREEBIE
9 years ago
lilia 01053335ac Don't send empty read status reports
// FREEBIE
9 years ago