Skip to content

Commit

Permalink
Merge pull request #19107 from DanutGavrus/fix/17237-old-picture-in-p…
Browse files Browse the repository at this point in the history
…review

[FIX 17237] Updated usages of source.
  • Loading branch information
Joel Bettner authored May 22, 2023
2 parents a891b6c + a4a6569 commit 23e5de4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class AttachmentModal extends PureComponent {
}

render() {
const source = this.state.source;
const source = this.props.source || this.state.source;
return (
<>
<Modal
Expand All @@ -274,7 +274,7 @@ class AttachmentModal extends PureComponent {
title={this.props.headerTitle || this.props.translate('common.attachment')}
shouldShowBorderBottom
shouldShowDownloadButton={this.props.allowDownload}
onDownloadButtonPress={() => this.downloadAttachment(source)}
onDownloadButtonPress={() => this.downloadAttachment(this.state.source)}
onCloseButtonPress={() => this.setState({isModalOpen: false})}
/>
<View style={styles.imageModalImageCenterContainer}>
Expand All @@ -286,7 +286,7 @@ class AttachmentModal extends PureComponent {
onToggleKeyboard={this.updateConfirmButtonVisibility}
/>
) : (
Boolean(this.state.source) &&
Boolean(source) &&
this.state.shouldLoadAttachment && (
<AttachmentView
containerStyles={[styles.mh5]}
Expand Down

0 comments on commit 23e5de4

Please sign in to comment.