Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3752336
D3424.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1015 B
Referenced Files
None
Subscribers
None
D3424.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D3424: [native] Disable `ImagePasteModal` send button after first press
Attached
Detach File
Event Timeline
Log In to Comment