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

Attachment preview cut out in comments fixed #5969

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
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import PressableWithSecondaryInteraction from '../../PressableWithSecondaryInter
import {showContextMenu} from '../../../pages/home/report/ContextMenu/ReportActionContextMenu';
import {CONTEXT_MENU_TYPES} from '../../../pages/home/report/ContextMenu/ContextMenuActions';
import AttachmentView from '../../AttachmentView';
import styles from '../../../styles/styles';

/*
* This is a default anchor component for regular links.
Expand All @@ -24,9 +25,11 @@ const BaseAnchorForCommentsOnly = ({
return (
isAttachment
? (
<Pressable onPress={() => {
fileDownload(href, fileName);
}}
<Pressable
style={styles.mw100}
onPress={() => {
fileDownload(href, fileName);
}}
>
<AttachmentView
sourceURL={href}
Expand Down
2 changes: 1 addition & 1 deletion src/components/AttachmentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const AttachmentView = (props) => {
<View style={styles.mr2}>
<Icon src={Paperclip} />
</View>
<Text style={[styles.textStrong]}>{props.file && props.file.name}</Text>
<Text style={[styles.textStrong, styles.flexShrink1]}>{props.file && props.file.name}</Text>
{props.shouldShowDownloadIcon && (
<View style={styles.ml2}>
<Tooltip text={props.translate('common.download')}>
Expand Down