From d2f1431a66ec498d2889c3c237738e7c8efdbcd7 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Tue, 12 Sep 2023 18:52:38 +0200 Subject: [PATCH] Fix flashing MR after restoring contact --- ts/models/conversations.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 6eaf279cb..cd7570634 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -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) {