Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected - Chat mp4 files with long name extend to the far edges of the screen #18830

Merged
merged 1 commit into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ class AttachmentModal extends PureComponent {
Boolean(this.state.source) &&
this.state.shouldLoadAttachment && (
<AttachmentView
containerStyles={[styles.mh5]}
source={source}
isAuthTokenRequired={this.props.isAuthTokenRequired}
file={this.state.file}
Expand Down
7 changes: 6 additions & 1 deletion src/components/AttachmentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const propTypes = {
/** Notify parent that the UI should be modified to accommodate keyboard */
onToggleKeyboard: PropTypes.func,

/** Extra styles to pass to View wrapper */
// eslint-disable-next-line react/forbid-prop-types
containerStyles: PropTypes.arrayOf(PropTypes.object),

...withLocalizePropTypes,
};

Expand All @@ -56,6 +60,7 @@ const defaultProps = {
onPress: undefined,
onScaleChanged: () => {},
onToggleKeyboard: () => {},
containerStyles: [],
};

const AttachmentView = (props) => {
Expand Down Expand Up @@ -124,7 +129,7 @@ const AttachmentView = (props) => {
}

return (
<View style={styles.defaultAttachmentView}>
<View style={[styles.defaultAttachmentView, ...props.containerStyles]}>
<View style={styles.mr2}>
<Icon src={Expensicons.Paperclip} />
</View>
Expand Down