Scroll to bottom of conversation when message is sent

This commit is contained in:
trevor-signal 2023-09-14 12:57:38 -04:00 committed by GitHub
parent 34740bdaff
commit e8eb7638c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -1436,7 +1436,10 @@ export class ConversationModel extends window.Backbone
newestId && messageIds && messageIds[messageIds.length - 1] === newestId;
if (isJustSent && existingConversation && !isLatestInMemory) {
void this.loadNewestMessages(undefined, undefined);
// The message is being sent before the user has scrolled down to load the newest
// messages into memory; in that case, we scroll the user all the way down by
// loading the newest message
drop(this.loadNewestMessages(newestId, undefined));
} else if (
// The message has to be not a story or has to be a story reply in direct
// conversation.