2861fa26a7
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 |
||
---|---|---|
.. | ||
conversations.js | ||
messages.js |