Page MenuHomePhabricator

D3424.diff
No OneTemporary

D3424.diff

diff --git a/native/chat/image-paste-modal.react.js b/native/chat/image-paste-modal.react.js
--- a/native/chat/image-paste-modal.react.js
+++ b/native/chat/image-paste-modal.react.js
@@ -34,7 +34,10 @@
},
} = props;
+ const [sendButtonDisabled, setSendButtonDisabled] = React.useState(false);
+
const sendImage = React.useCallback(async () => {
+ setSendButtonDisabled(true);
navigation.goBackOnce();
const selection: $ReadOnlyArray<PhotoPaste> = [imagePasteStagingInfo];
invariant(inputState, 'inputState should be set in ImagePasteModal');
@@ -52,7 +55,7 @@
<Image style={styles.image} source={{ uri: imagePasteStagingInfo.uri }} />
<View style={styles.linebreak} />
<View style={styles.spacer} />
- <Button title="Send" onPress={sendImage} />
+ <Button disabled={sendButtonDisabled} title="Send" onPress={sendImage} />
<View style={styles.linebreak} />
<View style={styles.spacer} />
<Button title="Cancel" onPress={cancel} />

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 12:26 AM (19 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2857485
Default Alt Text
D3424.diff (1015 B)

Event Timeline