We mark as read everything older than this message - to clean up old
stuff still marked unread in the database. If the user generally doesn't
read in the desktop app, so the desktop app only gets read receipts, we
can very easily end up with messages never marked as read (our previous
early read receipt handling, read receipts never sent because app was
offline).
FREEBIE
Because we only attach AttachmentViews to the DOM when they fire their
'update' event, we were subject to a race condition. If that event fired
after the final Message.render(), then it would be properly attached to
the final DOM node. If it fired early, it would end up missing from
the visible DOM entirely, attached to the old, discarded version of
the message.
This change updates our handling of a second call to loadAttachments().
Instead of bailing out if we've been called before, we attempt to
re-add our child AttachmentViews to the current DOM. But only if the
'update' event has been fired, and if their current parent node is not
what is in the DOM.
FREEBIE
To handle the same 'not quite at the bottom' case that our 30px buffer
gives us for marking messages read, we use the same atBottom() method to
determine whether we should mark everything unread. Saves the effort and
potential missed messages (due to partial pixels, etc.).
FREEBIE
This is no longer guaranteed to be true. If you're scrolled up in a
conversation, you may not have read all messages. Setting the
unreadCount to zero will prevent the user from marking any of their
existing messages as unread until something else happens, like receiving
a read receipt or new message.
FREEBIE
- initialize doesn't need to call update because
MessageView.renderExpiring() calls it immediately
- we don't need the className because that's already present on
the el it attaches to, part of the MessageView's template.
FREEBIE
- 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
It can be moved if you're not scrolled to the bottom of of the window
or the window doesn't have focus when a new message comes in. Other than
that, it marches up the window until you close and reopen the
conversation, or send a message.
Note that we do NOT mark messages as read if they come in when you are
scrolled up. But we do mark the entire conversation as read if you
switch away from the app and back.
FREEBIE
Re-renders happen when we re-fetch messages from the database, and our
previous technique for loading attachments resulted in a new attachment
view added for every call to render()
This change ensures that a second call to render() does not add any more
attachment views.
FREEBIE
Note that we're removing position: relative for the contact class, and
there might be some unexpected layout impacts. Thus far I haven't seen
any.
FREEBIE
- Last seen indicator now spans the full conversation, with subtle
shadow highlights above and below
- Scrollbars now overlap the content of the conversation, allowing last
seen indicator to touch the right edge of the window.
- The iOS and Android conversation background is now #eee instead of
white, which meant that the outgoing messages (Android) and incoming
messages (iOS) had to be updated for contrast. They now have white
backgrounds.
- Similarly, the scroll down button needed more contrast, and its
background is now white in light themes.
FREEBIE
This test is out of date with respect to the latest signed key rotation rules
implemented in b92dd45 and 536dd7b. Previously we would only keep the last two
signed keys, but now we keep at least three as well as requiring a minimum
retention period. As a result, this test should be failing, but we haven't
noticed because it's not using the `done` parameter to signal its asynchronous
nature.
// FREEBIE