Latest message isn't always fully visible after loading conversation
When opening a private conversation where the latest message contains multiple images, the bottom of the latest message is sometimes below the viewport, making it necessary to scroll down manually to see the whole message. This can happen regardless of whether the latest message has any text.
Logging shows that we're eagerly loading the text of the latest message, if it has any, and automatically scrolling to the bottom after adding the text and images to each message, as expected. But for some reason this scrolling doesn't make the whole of the latest message visible.
Steps to reproduce:
- Check out the 1242-display-image-attachments-fake-data branch (commit 54082209)
- Create a test contact with no messages
- Repeatedly send a message to the contact, close and reopen the conversation (fake attachments will be added to the message when the conversation's reopened)
- Once there's more than a screenful of messages and the latest message has multiple images, repeatedly close and reopen the conversation without sending any more messages
- It may take a lot of tries to reproduce the bug
The bug seems to be a race condition. I was able to reproduce it on the Nexus 5X and the Moto G 4G.
Subtask of #1237.