HomePhabricator
Diffusion Comm 67c0d4cacb49

[native] Disable `ImagePasteModal` send button after first press

Description

[native] Disable ImagePasteModal send button after first press

Summary:
Disable the button after it's pressed for the first time to prevent issue with multiple sends.

Also moved inputState.sendMultimediaMessage(selection, threadInfo); to an IIFE.

Test Plan:

  1. Copy image to clipboard
  2. Paste image into TextInput to pull up ImagePasteModal
  3. Try hitting the send button in quick succession
  4. Make sure that the image only gets sent once

Reviewers: palys-swm, def-au1t, varun, benschac, ashoat

Reviewed By: ashoat

Subscribers: ashoat, Adrian, karol-bisztyga

Differential Revision: https://phabricator.ashoat.com/D3424

Details

Provenance
atulAuthored on Mar 14 2022, 11:43 AM
Reviewer
ashoat
Differential Revision
D3424: [native] Disable `ImagePasteModal` send button after first press
Parents
rCOMMc1fc63d302a3: [native] Remove unnecessary `invariant` in `ImagePasteModal:sendImage`
Branches
Unknown
Tags
Unknown