Fix flashing MR after restoring contact

This commit is contained in:
Fedor Indutny
2023-09-12 18:52:38 +02:00
committed by GitHub
parent be6331d75f
commit d2f1431a66

View File

@@ -3724,7 +3724,6 @@ export class ConversationModel extends window.Backbone
if (!storyId || isDirectConversation(this.attributes)) {
await this.maybeApplyUniversalTimer();
expireTimer = this.get('expireTimer');
await this.restoreContact();
}
const recipientMaybeConversations = map(
@@ -3860,6 +3859,12 @@ export class ConversationModel extends window.Backbone
extraReduxActions,
});
// The call above enables profile sharing so we have to restore contact
// afterwards, otherwise Message Request state will flash.
if (!storyId || isDirectConversation(this.attributes)) {
await this.restoreContact();
}
const renderDuration = Date.now() - renderStart;
if (renderDuration > SEND_REPORTING_THRESHOLD_MS) {