Skip to content

Commit

Permalink
Move send awaits after updating
Browse files Browse the repository at this point in the history
- Creates a better UX.
  • Loading branch information
sondreb committed Oct 20, 2024
1 parent 3d46e14 commit c405369
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/app/apps/app/chat/chat.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit c405369

Please sign in to comment.