Turns out that we reload thumbnails for every message when any new
message is added to the conversation. This fix prevents that by actually
checking for the proper sentinel on the message model
Currently disabled: the ability to send quoted replies.
Quote-related functionality changes:
- We generate thumbnails for quoted attachments, so a receiving client doesn't need the original message to see the thumbnail
- Support for exporting and importing messages with quote thumbnails
Other visual changes:
- Big refactor of CSS to ensure that quote rules apply both inside of a message and in the message composition area:
- Emoji support in quotations consistent with normal message rendering
- Android theme: Tightened up spacing at the top of chat bubbles (fixes#2259)
- iOS theme: Center attachment images
- iOS theme: Proper treatment of small image attachments with no caption
- iOS theme: Proper treatment of small image attachments with quote
- When quote thumbnails are not square, make them fill the whole square space
- Better icon for videos when we don't have a thumbnail
- Android dark theme: Improved contrast for outgoing quotes
Dev changes:
- conversation_view.js and backup_test.js were eslint-ified
- Quite a few more message examples in the style guide: all of the visual issues addressed above, messages with errors, notifications (timer changes, safety number warnings, etc.)
- Full end-to-end test for export and import
- messages.getQuoteObjectUrl: early return
- backup.js: explaining variables for long if statement
- types/messages.js: Log if thumbnail has neither data nor path
- sendmessage.js:
- remove extraneous logging
- fix indentation
- upload attachments and thumbnails in parallel
- preload: don't load fs for tests, just fse
- _conversation.scss: split two selectors into two lines, 0px -> 0
- backup_test.js: use fse.existsSync and comment twoSlashes regex
- network_tests_view_test.js: Comment duplicate assignment to window.getSocketStatus
Android: The gray border around the quote didn't interact well with the
image, which needed to overlap the border. For now we'll just remove the
border.
Also made the thumbnail image 2px bigger because I noticed that in some
cases there was a partial-pixel space below the image (where the rest of
the quote was making the container bigger).
iOS: The gray border around outgoing quotes was fading into the
background gray color, making the quote look a tiny bit more narrow than
the main message. Removed the border.
Note that substantial changes will be required for the updated Android
mockups, putting the quotation into the text box next to the attachment
preview.