From e26f6e946b01a0975b910f6208cb8be5f7cc5f6e Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Fri, 19 Mar 2021 16:53:27 +1100 Subject: [PATCH] Update comment --- Session/Conversations/ConversationVC+Interaction.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Session/Conversations/ConversationVC+Interaction.swift b/Session/Conversations/ConversationVC+Interaction.swift index fe3cbf42f..4c5613098 100644 --- a/Session/Conversations/ConversationVC+Interaction.swift +++ b/Session/Conversations/ConversationVC+Interaction.swift @@ -232,13 +232,13 @@ extension ConversationVC : InputViewDelegate, MessageCellDelegate, ContextMenuAc let tsMessage = TSOutgoingMessage.from(message, associatedWith: thread) Storage.write(with: { transaction in tsMessage.save(with: transaction) - // The new cell will be inserted here, but the TSOutgoingMessage now has no attachment. + // The new message cell is inserted at this point, but the TSOutgoingMessage doesn't have its attachment yet }, completion: { [weak self] in Storage.write(with: { transaction in MessageSender.send(message, with: attachments, in: thread, using: transaction) }, completion: { [weak self] in - // The TSOutgoingMessage has no attachment IDs until the `prep` finished. - // Scroll to bottom here so the tableview can calculate the cell's height with the attachments correctly. + // At this point the TSOutgoingMessage should have its attachments set, so we can scroll to the bottom knowing + // the height of the new message cell self?.scrollToBottom(isAnimated: false) }) self?.handleMessageSent()