Conversation.onOpened: Wait for outstanding message processing

This commit is contained in:
Scott Nonnenberg 2020-04-27 09:15:31 -07:00
parent df849c65a8
commit 3966d55d3b

View file

@ -1733,7 +1733,12 @@
window.log.warn(`onOpened: Did not find message ${messageId}`);
}
// Incoming messages may still be processing, so we wait until those are
// complete to pull the 500 most-recent messages in this conversation.
this.model.queueJob(() => {
this.loadNewestMessages();
this.model.updateLastMessage();
});
this.focusMessageField();
@ -1742,8 +1747,6 @@
this.setQuoteMessage(quotedMessageId);
}
this.model.updateLastMessage();
const statusPromise = this.model.throttledGetProfiles();
// eslint-disable-next-line more/no-then
this.statusFetch = statusPromise.then(() =>