Skip to content

Commit 52d7e82

Browse files
authored
Merge pull request #317 from GetStream/CRNS-151/image-view-close-button-android
CRNS-151: removing flex from view container to allow button to be clickable on android and ios and making android not crash from MessageInput
2 parents 0d5b884 + ca56f13 commit 52d7e82

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/components/Attachment/Gallery.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ const ImageContainer = styled.TouchableOpacity`
5555
`;
5656

5757
const HeaderContainer = styled.View`
58-
flex: 1;
5958
flex-direction: row;
6059
justify-content: flex-end;
6160
z-index: 1000;

src/components/MessageInput/MessageInput.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ const Container = styled.View`
3737
border-radius: 10px;
3838
flex-direction: column;
3939
margin-horizontal: 10px;
40-
padding-top: ${({ padding, theme }) =>
41-
padding ? theme.messageInput.container.conditionalPadding : 0}px;
40+
padding-top: ${({ imageUploads, theme }) =>
41+
imageUploads && imageUploads.length
42+
? theme.messageInput.container.conditionalPadding
43+
: 0}px;
4244
${({ theme }) => theme.messageInput.container.css};
4345
`;
4446

@@ -340,7 +342,7 @@ const MessageInput = (props) => {
340342
}
341343

342344
return (
343-
<Container padding={imageUploads && imageUploads.length > 0}>
345+
<Container imageUploads={imageUploads}>
344346
{fileUploads && (
345347
<FileUploadPreview
346348
AttachmentFileIcon={AttachmentFileIcon}

src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ exports[`MessageInput should render MessageInput 1`] = `
2121
}
2222
>
2323
<View
24-
padding={false}
24+
imageUploads={Array []}
2525
style={
2626
Array [
2727
Object {

src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@ exports[`Thread should match thread snapshot 1`] = `
20632063
</RCTScrollView>
20642064
</View>
20652065
<View
2066-
padding={false}
2066+
imageUploads={Array []}
20672067
style={
20682068
Array [
20692069
Object {

0 commit comments

Comments
 (0)