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

remove file name from attachment modal #14962

Merged
merged 1 commit into from
Feb 10, 2023
Merged
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
11 changes: 0 additions & 11 deletions src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import HeaderWithCloseButton from './HeaderWithCloseButton';
import fileDownload from '../libs/fileDownload';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import ConfirmModal from './ConfirmModal';
import TextWithEllipsis from './TextWithEllipsis';
import HeaderGap from './HeaderGap';
import SafeAreaConsumer from './SafeAreaConsumer';

Expand Down Expand Up @@ -233,8 +232,6 @@ class AttachmentModal extends PureComponent {
// If source is a URL, add auth token to get access
const source = this.state.source;

const {fileName, fileExtension} = FileUtils.splitExtensionFromFileName(this.props.originalFileName || lodashGet(this.state, 'file.name', ''));

return (
<>
<Modal
Expand All @@ -254,14 +251,6 @@ class AttachmentModal extends PureComponent {
shouldShowDownloadButton={this.props.allowDownload}
onDownloadButtonPress={() => this.downloadAttachment(source)}
onCloseButtonPress={() => this.setState({isModalOpen: false})}
subtitle={fileName ? (
<TextWithEllipsis
leadingText={fileName}
trailingText={fileExtension ? `.${fileExtension}` : ''}
wrapperStyle={[styles.w100]}
textStyle={styles.mutedTextLabel}
/>
) : ''}
/>
<View style={styles.imageModalImageCenterContainer}>
{this.state.source && (
Expand Down