Reduce fetches when you open a conversation.

This commit is contained in:
Greyson Parrelli
2021-06-17 10:51:09 -04:00
committed by Cody Henthorne
parent 3c6bed90db
commit 93f37ad70f
5 changed files with 29 additions and 4 deletions

View File

@@ -97,6 +97,8 @@ class ConversationDataSource implements PagedDataSource<ConversationMessage> {
records = attachmentHelper.buildUpdatedModels(context, records);
stopwatch.split("attachment-models");
List<ConversationMessage> messages = Stream.of(records)
.map(m -> ConversationMessageFactory.createWithUnresolvedData(context, m, mentionHelper.getMentions(m.getId())))
.toList();