Skip to content

Commit

Permalink
removed fix for something that was fixed elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
JediWattson committed Oct 23, 2022
1 parent 962c589 commit f6e6b43
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,6 @@ class AttachmentModal extends PureComponent {
this.updateConfirmButtonVisibility = this.updateConfirmButtonVisibility.bind(this);
}

// this prevents a bug in iOS that would show the last image before closing then opening on a new image
static getDerivedStateFromProps(props, state) {
if (state.isModalOpen && props.sourceURL && state.isModalOpen !== state.prevIsModalOpen) {
return {
prevIsModalOpen: true,
file: {name: lodashGet(props, 'originalFileName', '')},
sourceURL: props.isAuthTokenRequired ? addEncryptedAuthTokenToURL(props.sourceURL) : props.sourceURL,
};
}

if (!state.isModalOpen && state.isModalOpen !== state.prevIsModalOpen) {
return {prevIsModalOpen: false};
}

return null;
}

/**
* Helps to navigate between next/previous attachments
* @param {Object} param
Expand Down

0 comments on commit f6e6b43

Please sign in to comment.