diff --git a/src/compose/ComposeBox.ios.js b/src/compose/ComposeBox.ios.js index 8b1a9457401..a72365b9d5f 100644 --- a/src/compose/ComposeBox.ios.js +++ b/src/compose/ComposeBox.ios.js @@ -407,6 +407,7 @@ class ComposeBox extends PureComponent { onImageSelect={this.handleImageSelect} disableCamera={draftImages && Object.keys(draftImages).length >= 4} disableUpload={draftImages && Object.keys(draftImages).length >= 4} + maxFiles={4 - Object.keys(draftImages).length} /> diff --git a/src/compose/ComposeMenu.js b/src/compose/ComposeMenu.js index ebdcc436f81..1c64703c819 100644 --- a/src/compose/ComposeMenu.js +++ b/src/compose/ComposeMenu.js @@ -20,6 +20,7 @@ type Props = { onImageSelect: Object => void, disableUpload?: boolean, disableCamera?: boolean, + maxFiles?: number, }; /** @@ -76,13 +77,14 @@ class ComposeMenu extends PureComponent { handleImageUpload = () => { const { handleImagePickerResponse } = this; + const { maxFiles } = this.props; ImagePicker.openPicker({ mediaType: 'photo', multiple: true, compressImageMaxWidth: 1600, compressImageMaxHeight: 1600, compressImageQuality: 0.7, - maxFiles: 4, + maxFiles, }) .then(images => { handleImagePickerResponse({