From bb843f8f145097be3c75d92e60d1bded6c8f4fc3 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Tue, 15 Jun 2021 03:04:55 +0300 Subject: [PATCH] Chat List: Fix last message when sent from another app --- src/modules/actions/apiUpdaters/messages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/actions/apiUpdaters/messages.ts b/src/modules/actions/apiUpdaters/messages.ts index 615ff5a69..8880245b9 100644 --- a/src/modules/actions/apiUpdaters/messages.ts +++ b/src/modules/actions/apiUpdaters/messages.ts @@ -80,7 +80,7 @@ addReducer('apiUpdate', (global, actions, update: ApiUpdate) => { } // @perf Wait until scroll animation finishes or simply rely on delivery status update (which is itself delayed) - if (!message.isOutgoing) { + if (!isMessageLocal(message as ApiMessage)) { setTimeout(() => { setGlobal(updateChatLastMessage(getGlobal(), chatId, newMessage)); }, ANIMATION_DELAY);