From c405369de9220041f10ae4e490c1c3c6b117f21f Mon Sep 17 00:00:00 2001 From: SondreB Date: Sun, 20 Oct 2024 09:36:21 +0200 Subject: [PATCH] Move send awaits after updating - Creates a better UX. --- app/src/app/apps/app/chat/chat.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/app/apps/app/chat/chat.component.ts b/app/src/app/apps/app/chat/chat.component.ts index 7623a59f..7dc865e0 100644 --- a/app/src/app/apps/app/chat/chat.component.ts +++ b/app/src/app/apps/app/chat/chat.component.ts @@ -339,13 +339,13 @@ export class ChatComponent implements OnDestroy { }, }); - await record?.send(recipientDid); - await record?.send(); - let json: any = { record: record, data: data, direction: 'out' }; this.messages.update((requests) => [...requests, json]); this.message = ''; + + await record?.send(recipientDid); + await record?.send(); } }